Here is what I have been able to do after installing the permute module: My updated code looks like: #!/usr/bin/perl use lib "/u/basappas/local/perl/Algorithm-Permute-0.06/Algorithm::Permute"; Algorithm::Permute::permute { print "@array\n" } @array;
When I execute this script, I get the following error: Can't call method "Algorithm::Permute::permute" without a package or object reference at Perm.pl line 3. Actually, I took this example from permute user manual, which says: use Algorithm::Permute; my $p = new Algorithm::Permute(['a'..'d']); while (@res = $p->next) { print join(", ", @res), "\n"; } my @array = (1..9); Algorithm::Permute::permute { print "@array\n" } @array; Where Am I going wrong? Regards On Mon, Mar 31, 2008 at 6:40 PM, Sharan Basappa <[EMAIL PROTECTED]> wrote: > I did the following: > perl Makefile.PL PREFIX=/u/basappas/local/perl/Algorithm-Permute-0.06 > > I got the following message: > perl/Algorithm-Permute-0.06 > Writing Makefile for Algorithm::Permute > > Now what? Should I execute the make file? > > After that can I point to this library and start using new library? > > Regards > > > > On Wed, Mar 26, 2008 at 3:45 PM, sisyphus <[EMAIL PROTECTED]> wrote: > > > > On Mar 25, 2:52 am, [EMAIL PROTECTED] (Sharan Basappa) wrote: > > > Hi, > > > > > > I am trying to use permute call from the above module and I get the > > > following error. > > > I believe this is due to either missing lib or incorrect path setting. > > > Can you tell > > > me how to install this package quickly in my home path and try out this > call? > > > > > > Regards > > > > > > Can't locate Algorithm/Permute.pm in @INC (@INC contains: > > > /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 > > > /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi > > > /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi > > > /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi > > > /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi > > > /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi > > > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi > > > /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 > > > /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 > > > /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 > > > /usr/lib/perl5/site_perl > > > /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi > > > /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi > > > /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi > > > /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi > > > /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi > > > /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi > > > /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 > > > /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 > > > /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 > > > /usr/lib/perl5/vendor_perl .) at Perm.pl line 2. > > > BEGIN failed--compilation aborted at Perm.pl line 2. > > > > In addition to Paul's advice, I notice that @INC does not appear to > > contain (anything that resembles my expectation of what would be) your > > "home path". > > Assuming that Permute.pm was successfully installed into the /home/me/ > > lib/Algorithm/ directory, then Perm.pl would need to begin with: > > > > use lib '/home/me/lib'; > > > > If, instead, the problem is how to install Algorithm::Permute into / > > home/me/lib, then (with a manual install) it's just a matter of > > starting with: > > > > perl Makefile.PL PREFIX=/home/me/lib > > or > > perl Makefile.PL PREFIX=~/lib > > > > (This is documented in 'perldoc Extutils::MakeMaker', which is > > referenced in the FAQ entry that Paul presented.) > > > > Cheers, > > Rob > > > > > > > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > http://learn.perl.org/ > > > > > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/