Yes, my question was about how to install my OWN modules and ur explanation worked very well... one more Question :
U said,If I created a directory in /usr/local/lib/perl5/site_perl named > 'Foo/' and in that directory I put a file named 'Bar.pm', then I could use > that module by doing: > use Foo::Bar; it worked very well But if i want to have my module(say, same as above) in /usr/home/rahul/ instead of /usr/local/lib/perl5/site_perl then how i can put that directory in @INC...what then exacly i have to do.. Thanks, Rahul ----- Original Message ----- From: Dave Storrs <[EMAIL PROTECTED]> To: Martin Pfeffer <[EMAIL PROTECTED]> Cc: Rahul Garg <[EMAIL PROTECTED]>; Perl 6 Beginners list <[EMAIL PROTECTED]> Sent: Saturday, November 10, 2001 2:03 AM Subject: Re: installing modules > > > Since I suspect your next question would be "Ok, then how do I install the > CPAN module?" let me head this one off. > > The CPAN module (CPAN.pm) comes with the basic distro of Perl, so you > should already have it. Say you want to install the "CGI.pm" module from > CPAN. At your command line, you type: > perl -MCPAN -e 'install CGI' > The -MCPAN means "use a module (-M), specifically, CPAN.pm". The -e means > "the script will be specified on the command line." > > If this is the first time you've ever used CPAN, it will need to ask you a > LONG set of questions...don't be intimidated, it provides default answers > to pretty much everything, and the defaults are generally correct. > > > However, your question seems to have been about how to install your OWN > modules. Do this: > perl -e 'print join "\n", @INC, "\n";' > This will dump out a list of directories. On my system, the list is this: > /usr/local/lib/perl5/5.6.1/alpha-dec_osf > /usr/local/lib/perl5/5.6.1 > /usr/local/lib/perl5/site_perl/5.6.1/alpha-dec_osf > /usr/local/lib/perl5/site_perl/5.6.1 > /usr/local/lib/perl5/site_perl/5.6.0/alpha-dec_osf > /usr/local/lib/perl5/site_perl/5.6.0 > /usr/local/lib/perl5/site_perl > . > Now, if I put a file named "Foo.pm" in /usr/local/lib/perl5/site_perl, I > could then tell Perl to use that file as a module in one of my scripts by > putting the following line at the top of the script: > use Foo; > > If I created a directory in /usr/local/lib/perl5/site_perl named > 'Foo/' and in that directory I put a file named 'Bar.pm', then I could use > that module by doing: > use Foo::Bar; > > Hope this helps. > > Dave > > > On Fri, 9 Nov 2001, Martin Pfeffer wrote: > > > Install the CPAN Module > > Then type install Modulname > > > > Hope it helps > > martin > > > > Rahul Garg wrote: > > > > > well, > > > > > > i want to install modules on my system(linux) that i have made. > > > what i know is they are to be installed at @INC. > > > but exactly how.....any suggestions.... > > > any sources for reading... > > > > > > Bye, > > > Rahul > > > > > > > > > > > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]