Sponsored Content
Operating Systems OS X (Apple) Newbie PATH command question... Post 302722879 by Bridger on Monday 29th of October 2012 12:52:42 AM
Old 10-29-2012
Newbie PATH command question...

Still trying to pick up speed on the command line in OSX.

I have installed Apache, and some other server software, but am having problems getting my install of Perl to work. I feel like it's because my Apache install is looking for the base (built-in) Perl that came with OSX which is 5.10.

I have installed the latest version of Perl with MacPorts into another directory:

/opt/local/bin/perl5.16

How do I use the PATH command to make sure it always gets called? I never want to use the 5.10 version in OSX, only my installed version. And while I'm at it, is there a good beginner's explanation of PATH and what it's for and how it's used?

Ethon
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

newbie question

hi im thinking of getting unix but i have no idea where to start I know that its an OS similar to linux but what hardware does in run on? i've heard of solaris but im not quit sure what it is thankxs (3 Replies)
Discussion started by: ninja
3 Replies

2. UNIX for Dummies Questions & Answers

Newbie Question

Hi, I have a file, that is delimited by :: and the purpose of this file is none of your business. ;) There are about 65000 lines in this file, and there are lines that I would like to remove. About 45000 of them. Is there some sort of commands that I can run, to remove word(s) from this... (4 Replies)
Discussion started by: th3gh05t
4 Replies

3. UNIX for Dummies Questions & Answers

Very new newbie question

sorry if im not asking inthe right spot but, how do you turn the beeping off every time you hit a key onthe keyboard. I tried the click -n but it told me it didnt recognize click any help would be greatly appreciated ( the beeping is not going over well in the surrounding cubicles) thank you... (4 Replies)
Discussion started by: Split100
4 Replies

4. Shell Programming and Scripting

newbie question

hey all, I have repeatedly seen scripts containing the following syntax, grep "hello" $myfile >> $log 2>&1 can anyone explain exactly what "2>&1" mean? THANK YOU (4 Replies)
Discussion started by: mpang_
4 Replies

5. UNIX for Dummies Questions & Answers

newbie question

I am taking a db classes toward oracle 10g. I am taking unix as well . I need to know what is the best option for os . should I use linux fedora. or get a sun box and start learning from there. Thanks (6 Replies)
Discussion started by: xzyan
6 Replies

6. UNIX for Dummies Questions & Answers

UNIX newbie NEWBIE question!

Hello everyone, Just started UNIX today! In our school we use solaris. I just want to know how do I setup Solaris 10 not the GUI one, the one where you have to type the commands like ECHO, ls, pwd, etc... I have windows xp and I also have vmware. I hope I am not missing anything! :p (4 Replies)
Discussion started by: Hanamachi
4 Replies

7. Shell Programming and Scripting

perl newbie . &&..programming newbie (question 2)

Hello everyone, I am having to do a lot of perl scripting these days and I am learning a lot. I have this problem I want to move files from a folder and all its sub folders to one parent folder, they are all .gz files.. there is folder1\folder2\*.gz and there are about 50 folders... (1 Reply)
Discussion started by: xytiz
1 Replies

8. Shell Programming and Scripting

Newbie question: if[command not null]

hi, i have to put in my script a command that should tell me if the contents of two different paths are the same. I thought to write an "if" command who makes the diff of two files which contains the `ls` of the folders and go on with the script if is not null, but i'm afraid of the fact... (13 Replies)
Discussion started by: zangarules
13 Replies

9. Shell Programming and Scripting

What does this do (newbie question)...

I was looking through some code online and came accross this... ls *.txt | grep text1 | cat file1 – file2 | `echo wc –l` I know what "ls|grep text1" does and I know a word count gets echoed but beyond that I am confused. Please use layman terms as much as possible as I am a newbie. (8 Replies)
Discussion started by: elohssa
8 Replies

10. UNIX for Advanced & Expert Users

Command to see the logical volume path, device mapper path and its corresponding dm device path

Currently I am using this laborious command lvdisplay | awk '/LV Path/ {p=$3} /LV Name/ {n=$3} /VG Name/ {v=$3} /Block device/ {d=$3; sub(".*:", "/dev/dm-", d); printf "%s\t%s\t%s\n", p, "/dev/mapper/"v"-"n, d}' Would like to know if there is any shorter method to get this mapping of... (2 Replies)
Discussion started by: royalibrahim
2 Replies
Apache::TestRun(3)					User Contributed Perl Documentation					Apache::TestRun(3)

NAME
Apache::TestRun - Run the test suite SYNOPSIS
DESCRIPTION
The "Apache::TestRun" package controls the configuration and running of the test suite. METHODS
Several methods are sub-classable, if the default behavior should be changed. "bug_report" The "bug_report()" method is executed when "t/TEST" was executed with the "-bugreport" option, and "make test" (or "t/TEST") fail. Normally this is callback which you can use to tell the user how to deal with the problem, e.g. suggesting to read some document or email some details to someone who can take care of it. By default nothing is executed. The "-bugreport" option is needed so this feature won't become annoying to developers themselves. It's automatically added to the "run_tests" target in Makefile. So if you repeateadly have to test your code, just don't use "make test" but run "t/TEST" directly. Here is an example of a custom "t/TEST" My::TestRun->new->run(@ARGV); package My::TestRun; use base 'Apache::TestRun'; sub bug_report { my $self = shift; print <<EOI; +--------------------------------------------------------+ | Please file a bug report: http://perl.apache.org/bugs/ | +--------------------------------------------------------+ EOI } "pre_configure" The "pre_configure()" method is executed before the configuration for "Apache::Test" is generated. So if you need to adjust the setup before httpd.conf and other files are autogenerated, this is the right place to do so. For example if you don't want to inherit a LoadModule directive for mod_apreq.so but to make sure that the local version is used, you can sub-class "Apache::TestRun" and override this method in t/TEST.PL: package My::TestRun; use base 'Apache::TestRun'; use Apache::TestConfig; __PACKAGE__->new->run(@ARGV); sub pre_configure { my $self = shift; # Don't load an installed mod_apreq Apache::TestConfig::autoconfig_skip_module_add('mod_apreq.c'); $self->SUPER::pre_configure(); } Notice that the extension is .c, and not .so. Don't forget to run the super class' c<pre_configure()> method. "new_test_config" META: to be completed Persistent Custom Configuration When "Apache::Test" is first installed or used, it will save the values of "httpd", "apxs", "port", "user", and "group", if set, to a configuration file "Apache::TestConfigData". This information will then be used in setting these options for subsequent uses of "Apache-Test" unless temprorarily overridden, either by setting the appropriate environment variable ("APACHE_TEST_HTTPD", "APACHE_TEST_APXS", "APACHE_TEST_PORT", "APACHE_TEST_USER", and "APACHE_TEST_GROUP") or by giving the relevant option ("-httpd", "-apxs", "-port", "-user", and "-group") when the "TEST" script is run. To avoid either using previous persistent configurations or saving current configurations, set the "APACHE_TEST_NO_STICKY_PREFERENCES" environment variable to a true value. Finally it's possible to permanently override the previously saved options by passing "-save". Here is the algorithm of how and when options are saved for the first time and when they are used. We will use a few variables to simplify the pseudo-code/pseudo-chart flow: $config_exists - custom configuration has already been saved, to get this setting run "custom_config_exists()", which tests whether either "apxs" or "httpd" values are set. It doesn't check for other values, since all we need is "apxs" or "httpd" to get the test suite running. custom_config_exists() checks in the following order lib/Apache/TestConfigData.pm (if during Apache-Test build) , ~/.apache-test/Apache/TestConfigData.pm and Apache/TestConfigData.pm in the perl's libraries. $config_overriden - that means that we have either "apxs" or "httpd" values provided by user, via env vars or command line options. 1 Building Apache-Test or modperl-2.0 (or any other project that bundles Apache-Test). 1) perl Apache-Test/Makefile.PL (for bundles top-level Makefile.PL will run this as well) if $config_exists do nothing else create lib/Apache/TestConfigData.pm w/ empty config: {} 2) make 3) make test if $config_exists if $config_overriden override saved options (for those that were overriden) else use saved options else if $config_overriden save them in lib/Apache/TestConfigData.pm (which will be installed on 'make install') else - run interactive prompt for C<httpd> and optionally for C<apxs> - save the custom config in lib/Apache/TestConfigData.pm - restart the currently run program modperl-2.0 is a special case in (3). it always overrides 'httpd' and 'apxs' settings. Other settings like 'port', can be used from the saved config. 4) make install if $config_exists only in lib/Apache/TestConfigData.pm it will be installed system-wide else nothing changes (since lib/Apache/TestConfigData.pm won't exist) 2 Testing 3rd party modules (after Apache-Test was installed) Notice that the following situation is quite possible: cd Apache-Test perl Makefile.PL && make install so that Apache-Test was installed but no custom configuration saved (since its "make test" wasn't run). In which case the interactive configuration should kick in (unless config options were passed) and in any case saved once configured. $custom_config_path - perl's Apache/TestConfigData.pm (at the same location as Apache/TestConfig.pm) if that area is writable by that user (e.g. perl's lib is not owned by 'root'). If not, in ~/.apache-test/Apache/TestConfigData.pm. 1) perl Apache-Test/Makefile.PL 2) make 3) make test if $config_exists if $config_overriden override saved options (for those that were overriden) else use saved options else if $config_overriden save them in $custom_config_path else - run interactive prompt for C<httpd> and optionally for C<apxs> - save the custom config in $custom_config_path - restart the currently run program 4) make install Saving Custom Configuration Options If you want to override the existing custom configurations options to "Apache::TestConfigData", use the "-save" flag when running "TEST". If you are running "Apache::Test" as a user who does not have permission to alter the system "Apache::TestConfigData", you can place your own private configuration file TestConfigData.pm under "$ENV{HOME}/.apache-test/Apache/", which "Apache::Test" will use, if present. An example of such a configuration file is # file $ENV{HOME}/.apache-test/Apache/TestConfigData.pm package Apache::TestConfigData; use strict; use warnings; use vars qw($vars); $vars = { 'group' => 'me', 'user' => 'myself', 'port' => '8529', 'httpd' => '/usr/local/apache/bin/httpd', }; 1; perl v5.12.1 2008-02-25 Apache::TestRun(3)
All times are GMT -4. The time now is 02:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy