On Tue, Apr 15, 2008 at 9:58 PM, Chas. Owens <[EMAIL PROTECTED]> wrote:
> Where/how did you install the module.  If it was not installed in the normal
> directory (ie the one it will be installed in if you installed as root) you
> will need to either set the PERL5_LIB environmental variable or use the lib
> pragma.
>

yes, the module is installed as a local library.
It is in path /u/basappas/local/perl/onemore/Algorithm-Permute-0.11

The following are the steps I followed:
perl Makefile.PL
PREFIX=/u/basappas/local/perl/onemore/Algorithm-Permute-0.11/Algorithm
-- this step completes normal
make install - this step completes normal

PERL5LIB is set to:
/u/basappas/local/perl/onemore/Algorithm-Permute-0.11/ (should it
point to Algorithm?)

My code snippet is:
#!/usr/bin/perl
use warnings;
use lib "/u/basappas/local/perl/onemore/Algorithm-Permute-0.11";
use Algorithm::Permute;

my @array = (1..4);
Algorithm::Permute::permute { print "@array\n" } @array;

The error I get is:
Can't locate Algorithm/Permute.pm in @INC (@INC contains:
/u/basappas/local/perl/onemore/Algorithm-Permute-0.11

Question:
- Am I right in adding Algorithm to the prefix arg
(PREFIX=/u/basappas/local/perl/onemore/Algorithm-Permute-0.11/Algorithm)?
- I was originally not adding Algorithm to the arg, but tried this
option since perl seem to be looking for Permute.pm inside Algorithm
dir (or  is it?)

Regards

>  --
>  Chas. Owens
>  wonkden.net
>  The most important skill a programmer can have is the ability to read.
>
>
>
>  On Apr 15, 2008, at 12:00, Sharan Basappa wrote:
>
>
> >
> >
> >
> > On Fri, Apr 4, 2008 at 8:48 PM, Sharan Basappa <[EMAIL PROTECTED]>
> wrote:
> >
> > > Dont seem to have luck. I did make test followed by make install.
> > > Here is what I got:
> > > make install
> > > Installing
> /u/basappas/local/perl/Algorithm-Permute-0.06/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/Algorithm/Permute/Permute.so
> > > Installing
> /u/basappas/local/perl/Algorithm-Permute-0.06/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/Algorithm/Permute/Permute.bs
> > > Files found in blib/arch: installing files in blib/lib into
> > > architecture dependent library tree
> > > Installing
> /u/basappas/local/perl/Algorithm-Permute-0.06/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Algorithm/Permute.pm
> > > Installing
> /u/basappas/local/perl/Algorithm-Permute-0.06/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/Algorithm/Permute/autosplit.ix
> > > Installing
> /u/basappas/local/perl/Algorithm-Permute-0.06/share/man/man3/Algorithm::Permute.3pm
> > > Writing
> /u/basappas/local/perl/Algorithm-Permute-0.06/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/Algorithm/Permute/.packlist
> > > Appending installation info to
> > >
> /u/basappas/local/perl/Algorithm-Permute-0.06/lib/perl5/5.8.5/i386-linux-thread-multi/perllocal.pod
> > >
> > > The issue still remains. That is:
> > >
> > > > perl Perm2.pl
> > > >
> > >
> > > Can't locate Algorithm/Permute.pm in @INC (@INC contains:
> > >
> > > /u/basappas/local/perl/Algorithm-Permute-0.06
> > >
> > > /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 Perm2.pl line 4.
> > > BEGIN failed--compilation aborted at Perm2.pl line 4.
> > >
> > > Maybe I should rewind and start looking at this issue afresh now ...
> > >
> > > Regards
> > >
> > >
> > >
> > > On Tue, Apr 1, 2008 at 4:32 PM, sisyphus <[EMAIL PROTECTED]> wrote:
> > >
> > > >
> > > > > I did the following:
> > > > > perl Makefile.PL
> PREFIX=/u/basappas/local/perl/Algorithm-Permute-0.06
> > > > >
> > > >
> > > > That's probably where you've got the Algorithm-Permute source - I'm
> > > > not so sure it's a good idea to install the module into the source
> > > > folder, but if you want to do that then next run 'make test', followed
> > > > by 'make install'.
> > > >
> > > > Then, try this script:
> > > >
> > > > #!/usr/bin/perl
> > > > use warnings;
> > > > use lib "/u/basappas/local/perl/Algorithm-Permute-0.06";
> > > > use Algorithm::Permute;
> > > >
> > > > my @array = (1..4);
> > > >
> > > > Algorithm::Permute::permute { print "@array\n" } @array;
> > > >
> > > > Why are you installing version 0.06 when the latest version is 0.11 ?
> > > >
> > > >
> > > >
> > > > Cheers,
> > > > Rob
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > http://learn.perl.org/
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> > Looking at the error once again, I did notice that I was probably not
> > installing the module correctly.
> > When I looked at the error, it said: Can't locate Algorithm/Permute.pm ..
> > When I installed the module initially, the arg to prefix (perl
> > Makefile.pl PREFIX=...) included
> > the base directory and not Algorithm. The Algorithm directory expected
> > above did not exist.
> > Now I have installed as follows:
> > perl Makefile.pl PREFIX=<base_directory>/Algorithm
> > make install
> > make test
> >
> > All these steps go through fine. In addition, I also find Algorithm
> > directory under the base dir.
> > the following are the files I find:
> > Algorithm  Changes    coollex.o    MANIFEST  Permute.bs  Permute.pm
> README
> > bench      coollex.c  Makefile     META.yml  Permute.c   Permute.xs
> test.pl
> > blib       coollex.h  Makefile.PL  Perm2.pl  Permute.o   pm_to_blib
> typemap
> >
> > I thought this should solve my problem. The old error has disappeared
> > (Can't locate Algorithm/Permute.pm in)
> > But now I see a new error. That is:
> > Can't locate loadable object for module Algorithm::Permute in @INC
> >
> > I was hoping that someone can provide some input so that I can get
> > around this issue.
> >
> > Regards
> >
> > --
> >
> > 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/


Reply via email to