Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

algorithm/permute.pm
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.

Report this thread to moderator Post Follow-up to this message
Old Post
Sharan Basappa
03-25-08 12:05 AM


Re: algorithm/permute.pm
On Mar 24, 11:52=A0am, sharan.basa...@gmail.com (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 ca=[/color
]
ll?

perldoc -q install
Found in /opt2/Perl5_8_4/lib/perl5/5.8.4/pod/perlfaq8.pod
How do I install a module from CPAN?


Paul Lalli


Report this thread to moderator Post Follow-up to this message
Old Post
Paul Lalli
03-25-08 12:05 AM


Re: algorithm/permute.pm
On Mar 25, 2:52=A0am, sharan.basa...@gmail.com (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 ca=[/color
]
ll?
>
> 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=3D/home/me/lib
or
perl Makefile.PL PREFIX=3D~/lib

(This is documented in 'perldoc Extutils::MakeMaker', which is
referenced in the FAQ entry that Paul presented.)

Cheers,
Rob


Report this thread to moderator Post Follow-up to this message
Old Post
Sisyphus
03-26-08 01:03 PM


Re: algorithm/permute.pm
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 <sisyphus359@gmail.com> wrote:
>
> On Mar 25, 2:52 am, sharan.basa...@gmail.com (Sharan Basappa) wrote: 
>
>  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: beginners-unsubscribe@perl.org
>  For additional commands, e-mail: beginners-help@perl.org
>  http://learn.perl.org/
>
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Sharan Basappa
03-31-08 01:29 PM


Re: algorithm/permute.pm
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
<sharan.basappa@gmail.com> 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 <sisyphus359@gmail.com> wrote: 
>

Report this thread to moderator Post Follow-up to this message
Old Post
Sharan Basappa
04-01-08 12:51 AM


Re: algorithm/permute.pm
> 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


Report this thread to moderator Post Follow-up to this message
Old Post
Sisyphus
04-02-08 12:05 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Beginners archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:47 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.