Re: perlbrew

2023-11-22 Thread Olivier
Hi,

>
> Try to change the version of my Perl but not change. 

What do you do to change the version of Perl? What command? On what system?

> I have Perl v5.36.1, I tried to change Perl to Perl v5.10.0 but I didn't get 
> the
> desired effect. 
>
> I have the following error:
>
>  A sub-shell is launched with perl-5.10.0 as the activated perl. Run 'exit' to
>  finish it.

Also, why do you want to use an older version of Perl? There is very few
exceptions to the upward compatibility of Perl, so any scri[pt
developped for 5.10 will work on 5"36 with only very minimum
modifications.

Best regards,

Olivier
-- 

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




perlbrew

2023-11-22 Thread William Torrez Corea
Try to change the version of my Perl but not change.

I have Perl v5.36.1, I tried to change Perl to Perl v5.10.0 but I didn't
get the desired effect.

I have the following error:

A sub-shell is launched with perl-5.10.0 as the activated perl. Run 'exit'
> to finish it.
>
-- 

With kindest regards, William.

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄


Re: perlbrew and modules

2017-12-07 Thread SSC_perl
> On Dec 7, 2017, at 3:39 PM, Andy Bach  wrote:
> 
> meaning, you added:
> use lib q{/home/user/.cpanm/};

Well, no.  That one didn't work.  I had to be specific about where 
CGI::Carp was installed to get it to work:

use lib '/home/user/.cpanm/work/1512448551.26554/CGI-4.38/lib';

> Right, so that's your 500 error. But you added the same line in the original 
> (before the use Carp line?) and it *didn't* fix the problem?  Can you sym 
> link the .cpanm dir under one of those @INC dirs.   Hm, there's also an 
> PERL5LIB env var you can set to add libraries (maybe in the webserver config).

I've read about those, but I'd rather not jerry rig this install just 
to get it to work.  I've been using perlbrew on my Mac (with 5 different perls) 
for years without incident, so that's why I'm at a loss as to what's happening 
on this VPS.  Maybe I should just cut my losses, delete everything, and start 
over.  I just hate doing that after spending so much time on something.  It's 
like admitting defeat and giving up. ;)

I just thought to compare the install on my Mac with the one on the VPS 
and the binaries of perlbrew are exactly the same, but the binaries for 
patchperl and cpanm are wildly different from each other.  Are these customized 
during installation for the platform that running?  If not, would it be safe to 
copy my known good copies over to the server (Mac vs Linux)?

Frank
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: perlbrew and modules

2017-12-07 Thread Andy Bach
>>   I found a .cpanm directory in /home/user where all the modules are
>> being installed.  Could that have anything to do with it?  I tried adding
>> that directory with "use lib" but I still get the 500 error.

 >  I ran your script and, when I manually include the .cpanm directory, it
returns:
/home/user/cgi-bin/test.pl syntax OK

meaning, you added:
use lib q{/home/user/.cpanm/};

> otherwise, it returns:

Can't locate CGI/Carp.pm in @INC (you may need to install the CGI::Carp
module) (@INC contains: /home/user/perl5/perlbrew/
perls/perl-5.26.1/lib/site_perl/5.26.1/x86_64-linux
/home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1
/home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/x86_64-linux
/home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1) at
/home/user/cgi-bin/test.pl line 9. BEGIN failed--compilation aborted at
/home/user/cgi-bin/test.pl line 9.

Right, so that's your 500 error. But you added the same line in the
original (before the use Carp line?) and it *didn't* fix the problem?  Can
you sym link the .cpanm dir under one of those @INC dirs.   Hm, there's
also an PERL5LIB env var you can set to add libraries (maybe in the
webserver config).


On Thu, Dec 7, 2017 at 5:29 PM, SSC_perl  wrote:

> > On Dec 7, 2017, at 3:09 PM, Andy Bach  wrote:
> >
> > Can you not look a the web server's error_log?  A 500 error would put
> the perl error msg in there.  Have you tried just "use" a different module?
>
> Those errors aren't appearing in the errors log in cPanel.  I
> couldn't find another error log in WHM.
>
> > Hmm, can you try...
>
> I ran your script and, when I manually include the .cpanm
> directory, it returns:
>
> /home/user/cgi-bin/test.pl syntax OK
>
> otherwise, it returns:
>
> Can't locate CGI/Carp.pm in @INC (you may need to install the CGI::Carp
> module) (@INC contains: /home/user/perl5/perlbrew/
> perls/perl-5.26.1/lib/site_perl/5.26.1/x86_64-linux
> /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1
> /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/x86_64-linux
> /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1) at
> /home/user/cgi-bin/test.pl line 9. BEGIN failed--compilation aborted at
> /home/user/cgi-bin/test.pl line 9.
>
>
> Here's more info.  I ran the following command, which produced an
> error:
>
> > perlbrew exec perl -e 'print $]'
> Use of uninitialized value in list assignment at
> /home/user/perl5/perlbrew/bin/perlbrew line 2220.
> perl-5.26.1
> ==
> 5.026001
>
> Looks like this has been reported for a few years without a
> solution:
>
> https://rt.cpan.org/Public/Bug/Display.html?id=111978
>
> Could this be part of the problem?  I'm running perlbrew 0.80.
>
> Frank
>
> P.S. Re-installing cpanm didn't solve the problem.




-- 

a

Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk


Re: perlbrew and modules

2017-12-07 Thread SSC_perl
> On Dec 7, 2017, at 3:09 PM, Andy Bach  wrote:
> 
> Can you not look a the web server's error_log?  A 500 error would put the 
> perl error msg in there.  Have you tried just "use" a different module?  

Those errors aren't appearing in the errors log in cPanel.  I couldn't 
find another error log in WHM.

> Hmm, can you try...

I ran your script and, when I manually include the .cpanm directory, it 
returns:

/home/user/cgi-bin/test.pl syntax OK

otherwise, it returns:

Can't locate CGI/Carp.pm in @INC (you may need to install the CGI::Carp module) 
(@INC contains: 
/home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/x86_64-linux 
/home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1 
/home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/x86_64-linux 
/home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1) at 
/home/user/cgi-bin/test.pl line 9. BEGIN failed--compilation aborted at 
/home/user/cgi-bin/test.pl line 9.


Here's more info.  I ran the following command, which produced an error:

> perlbrew exec perl -e 'print $]'
Use of uninitialized value in list assignment at 
/home/user/perl5/perlbrew/bin/perlbrew line 2220.
perl-5.26.1
==
5.026001

Looks like this has been reported for a few years without a solution:

https://rt.cpan.org/Public/Bug/Display.html?id=111978

    Could this be part of the problem?  I'm running perlbrew 0.80.

Frank

P.S. Re-installing cpanm didn't solve the problem.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: perlbrew and modules

2017-12-07 Thread Andy Bach
>   I've run into another strange problem that I don't understand.
> Running the script below produces the output "Perl v5.26.1".  However, if
I
> add the line: use CGI::Carp qw(fatalsToBrowser);  it produces a 500 error.
>
>   On the shared server, this worked as it should, with
> 'fatalsToBrowser' showing any errors.

Can you not look a the web server's error_log?  A 500 error would put the
perl error msg in there.  Have you tried just "use" a different module?
Hmm, can you try

#!/home/user/perl5/perlbrew/perls/latest/bin/perl
use v5.26;
use warnings;
use diagnostics;

print "Content-type: text/html\n\n";
print `/home/user/perl5/perlbrew/perls/latest/bin/perl -c
/path/to/my/cgi-bin/file 2>&1` , "\n";

in a different  file?

a

On Thu, Dec 7, 2017 at 1:50 PM, SSC_perl  wrote:

> I've run into another strange problem that I don't understand.
> Running the script below produces the output "Perl v5.26.1".  However, if I
> add the line: use CGI::Carp qw(fatalsToBrowser);  it produces a 500 error.
>
> On the shared server, this worked as it should, with
> 'fatalsToBrowser' showing any errors.  But the VPS is just backwards -
> adding it crashes the script!  This actually happens with any module and,
> yes, they are installed:
>
> > cpanm install CGI::Carp
> install is up to date. (0.01)
> CGI::Carp is up to date. (4.38)
>
> I have been fighting with this VPS setup for almost 2 weeks now
> just to get a functioning modern Perl environment and I'm about at my wits
> end.  It shouldn't be this hard.
>
> I'd appreciate any help.
>
> Thanks,
> Frank
>
>
>
>
> #!/home/user/perl5/perlbrew/perls/latest/bin/perl
>
> use v5.26;
> use warnings;
> use diagnostics;
>
> print "Content-type: text/html\n\n";
> say 'Perl '. $^V;
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>


-- 

a

Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk


Re: perlbrew and modules

2017-12-07 Thread SSC_perl
> On Dec 7, 2017, at 1:40 PM, Shlomi Fish  wrote:
> 
> you should make sure that the modules you wish to use are in one of the
> dirs in @INC. cpanm should install to  the global directories.

Another question.  How can I check to make sure cpanm was installed 
properly under perlbrew?

Frank
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: perlbrew and modules

2017-12-07 Thread SSC_perl
> On Dec 7, 2017, at 1:40 PM, Shlomi Fish  wrote:
> 
> you should make sure that the modules you wish to use are in one of the
> dirs in @INC. cpanm should install to  the global directories.

That's what I thought.  Shouldn't "cpanm install Module::Name" do that 
on it's own?  There's only one perl install and one alias, and the alias is 
selected.  Running "perl -v" returns version 5.26.1 so how can I get perlbrew 
set to install in the current installation?

Frank
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: perlbrew and modules

2017-12-07 Thread Shlomi Fish
On Thu, 7 Dec 2017 12:44:51 -0800
SSC_perl  wrote:

> > On Dec 7, 2017, at 12:04 PM, Shlomi Fish  wrote:
> > 
> > What does:
> > 
> > say "@INC";
> > 
> > say if you add it to the script?  
> 
>   I get:
> 
> /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/x86_64-linux
> /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1
> /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/x86_64-linux
> /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1
> 
>   I found a .cpanm directory in /home/user where all the modules are
> being installed.  Could that have anything to do with it?  I tried adding
> that directory with "use lib" but I still get the 500 error.
> 

you should make sure that the modules you wish to use are in one of the
dirs in @INC. cpanm should install to  the global directories.

> Thanks,
> Frank



-- 
-
Shlomi Fish   http://www.shlomifish.org/
https://youtu.be/GoEn1YfYTBM - Tiffany Alvord - “Fall Together”

   Writing your own nirvana may be easier than writing a good
 blog engine ;)
— http://is.gd/3Hh82T

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: perlbrew and modules

2017-12-07 Thread SSC_perl
> On Dec 7, 2017, at 12:04 PM, Shlomi Fish  wrote:
> 
> What does:
> 
>   say "@INC";
> 
> say if you add it to the script?

    I get:

/home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/x86_64-linux
/home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1
/home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/x86_64-linux
/home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1

I found a .cpanm directory in /home/user where all the modules are 
being installed.  Could that have anything to do with it?  I tried adding that 
directory with "use lib" but I still get the 500 error.

Thanks,
Frank
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: perlbrew and modules

2017-12-07 Thread Shlomi Fish
On Thu, 7 Dec 2017 11:50:17 -0800
SSC_perl  wrote:

>   I've run into another strange problem that I don't understand.
> Running the script below produces the output "Perl v5.26.1".  However, if I
> add the line: use CGI::Carp qw(fatalsToBrowser);  it produces a 500 error.
> 
>   On the shared server, this worked as it should, with
> 'fatalsToBrowser' showing any errors.  But the VPS is just backwards - adding
> it crashes the script!  This actually happens with any module and, yes, they
> are installed:
> 
> > cpanm install CGI::Carp  
> install is up to date. (0.01)
> CGI::Carp is up to date. (4.38)
> 
>   I have been fighting with this VPS setup for almost 2 weeks now just
> to get a functioning modern Perl environment and I'm about at my wits end.
> It shouldn't be this hard.
> 
>   I'd appreciate any help.
> 
> Thanks,
> Frank
> 
> 
> 
> 
> #!/home/user/perl5/perlbrew/perls/latest/bin/perl
> 
> use v5.26;
> use warnings;
> use diagnostics;
> 
> print "Content-type: text/html\n\n";
> say 'Perl '. $^V;

Hi Frank!

What does:

say "@INC";

say if you add it to the script?


-- 
-
Shlomi Fish   http://www.shlomifish.org/
The Case for File Swapping - http://shlom.in/file-swap

Real men don’t listen to sentences that start with “Real men don’t”.
— http://whatsup.org.il/article/6023

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




perlbrew and modules

2017-12-07 Thread SSC_perl
I've run into another strange problem that I don't understand.  Running 
the script below produces the output "Perl v5.26.1".  However, if I add the 
line: use CGI::Carp qw(fatalsToBrowser);  it produces a 500 error.

On the shared server, this worked as it should, with 'fatalsToBrowser' 
showing any errors.  But the VPS is just backwards - adding it crashes the 
script!  This actually happens with any module and, yes, they are installed:

> cpanm install CGI::Carp
install is up to date. (0.01)
CGI::Carp is up to date. (4.38)

I have been fighting with this VPS setup for almost 2 weeks now just to 
get a functioning modern Perl environment and I'm about at my wits end.  It 
shouldn't be this hard.

I'd appreciate any help.

Thanks,
Frank




#!/home/user/perl5/perlbrew/perls/latest/bin/perl

use v5.26;
use warnings;
use diagnostics;

print "Content-type: text/html\n\n";
say 'Perl '. $^V;
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: perlbrew and cron

2017-12-07 Thread Hao Wu
0 23  * * * /path/to/perlbrew exec --with perl-5.20.0 perl /path/to/app.pl


On Thu, Dec 7, 2017 at 10:38 AM, SSC_perl  wrote:

> After moving to a VPS, I'm finally able to use perlbrew to use the
> latest perl, but it's not working the same as it does on my Mac.
>
> In terminal, I can call a perl script with either the full path to
> perl or with an alias I've set up in .bashrc.  So far, so good.  However,
> to run a script with cron, I can't seem to get it to run with the perlbrew
> version.  I've even tried it with just the path to the script, as mentioned
> by ikegami here:
>
> https://stackoverflow.com/questions/47457834/running-a-
> perl-script-from-crontab-when-you-use-perlbrew
>
> Unfortunately, I don't have anymore to go on than this as,
> literally, nothing happens - the script doesn't get run and I don't get an
> error email from cron, so I don't know where to look.
>
> Thanks,
> Frank
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>


Re: perlbrew and cron

2017-12-07 Thread Chris Fedde
You have to make sure that the cron job has the right path.  Usually it can
be as easy as calling a wrapper script that sets up the correct environment.

On Thu, Dec 7, 2017 at 1:38 PM, SSC_perl  wrote:

> After moving to a VPS, I'm finally able to use perlbrew to use the
> latest perl, but it's not working the same as it does on my Mac.
>
> In terminal, I can call a perl script with either the full path to
> perl or with an alias I've set up in .bashrc.  So far, so good.  However,
> to run a script with cron, I can't seem to get it to run with the perlbrew
> version.  I've even tried it with just the path to the script, as mentioned
> by ikegami here:
>
> https://stackoverflow.com/questions/47457834/running-a-
> perl-script-from-crontab-when-you-use-perlbrew
>
> Unfortunately, I don't have anymore to go on than this as,
> literally, nothing happens - the script doesn't get run and I don't get an
> error email from cron, so I don't know where to look.
>
> Thanks,
> Frank
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>


perlbrew and cron

2017-12-07 Thread SSC_perl
After moving to a VPS, I'm finally able to use perlbrew to use the 
latest perl, but it's not working the same as it does on my Mac.

In terminal, I can call a perl script with either the full path to perl 
or with an alias I've set up in .bashrc.  So far, so good.  However, to run a 
script with cron, I can't seem to get it to run with the perlbrew version.  
I've even tried it with just the path to the script, as mentioned by ikegami 
here:

https://stackoverflow.com/questions/47457834/running-a-perl-script-from-crontab-when-you-use-perlbrew

Unfortunately, I don't have anymore to go on than this as, literally, 
nothing happens - the script doesn't get run and I don't get an error email 
from cron, so I don't know where to look.

Thanks,
Frank
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Problem with perlbrew and LiteSpeed

2017-12-07 Thread SSC_perl
> On Dec 5, 2017, at 10:23 AM, Chas. Owens  wrote:
> 
> Test one: does the file actually exist.

Thanks for the tests.  It turns out there was a typo in the shebang 
line.  It was a tough one to diagnose as the error said the file wasn't there.  

Frank
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Problem with perlbrew and LiteSpeed

2017-12-05 Thread Chas. Owens
Test one: does the file actually exist.

It is possible that the user is different, or something else in the park is
wrong

Test two: are the permissions on the file and the directories leading up to
the file correct.

If the process can't see the file, then there will be a problem.

Test three: Is there config right?

It is possible that the server defines a location the cgi script must be in
and you have put the file in the wrong place (or used an absolute path
instead of a relative path in the config).

On Tue, Dec 5, 2017, 10:18 SSC_perl  wrote:

> I'm hoping someone has seen this before and can point me in the
> right direction.  I'm moving my site to a VPS to be able to use a more
> modern version of Perl, but I've run into a problem.
>
> I installed perlbrew along with Perl 5.26.1.  That went smoothly.
> However, when I try to run even a small test script in a browser, the
> server returns this:
>
> lscgid: execve():/home/user/www/cgi-bin/test.pl: No such file or directory
>
> The perlbrew installation on my Mac works perfectly, but on this
> *nix server, it doesn't**.  The VPS is using LiteSpeed, but I've been told
> it's a drop-in replacement for Apache, so everything *should* work the same
> as before.
>
> Do I need to do something more than just putting the perlbrew perl
> path in the shebang line?
>
> Has anyone seen anything like this before?  I'm working with my
> web host on this, but so far they don't seem to know what's going on, so I
> thought I'd ask here just in case.
>
> Thanks,
> Frank
>
> ** Running the script in terminal works properly, just not in the browser.
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>


Problem with perlbrew and LiteSpeed

2017-12-05 Thread SSC_perl
I'm hoping someone has seen this before and can point me in the right 
direction.  I'm moving my site to a VPS to be able to use a more modern version 
of Perl, but I've run into a problem.

    I installed perlbrew along with Perl 5.26.1.  That went smoothly.  
However, when I try to run even a small test script in a browser, the server 
returns this:

lscgid: execve():/home/user/www/cgi-bin/test.pl: No such file or directory

    The perlbrew installation on my Mac works perfectly, but on this *nix 
server, it doesn't**.  The VPS is using LiteSpeed, but I've been told it's a 
drop-in replacement for Apache, so everything *should* work the same as before.

Do I need to do something more than just putting the perlbrew perl path 
in the shebang line?

Has anyone seen anything like this before?  I'm working with my web 
host on this, but so far they don't seem to know what's going on, so I thought 
I'd ask here just in case.

Thanks,
Frank

** Running the script in terminal works properly, just not in the browser.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: perlbrew error

2014-06-15 Thread John SJ Anderson
On Sun, Jun 15, 2014 at 10:31 AM, Subinoy Biswas  wrote:
> Hi,
> I am having a trouble installing any module with cpanm in perlbrew
> perl-5.20.0 in an test1 local lib. Below I am pasting the verbose. Please
> help me to solve this issue

So, you need to install Tie::Hash::Indexed:

> Can't locate Tie/Hash/Indexed.pm in @INC (you may need to install the
> Tie::Hash::Indexed module)

Which you tried to do:

> subinoybiswas@sunymacs:~/work_ubc/seq$ cpanm Tie::Hash::Indexed
[ snip ]

Which failed:

> ! Installing Tie::Hash::Indexed failed. See
> /Users/subinoybiswas/.cpanm/build.log for details.

So the contents of that file might be helpful.

Additionally:

> cannot unlink file for
> /Users/subinoybiswas/.cpanm/work/1383165137.7601/build.log: Permission
> denied at /loader/0x7fd8d10320a0/App/cpanminus/script.pm line 1.
> cannot restore permissions to 0100644 for
> /Users/subinoybiswas/.cpanm/work/1383165137.7601/build.log: Permission
> denied at /loader/0x7fd8d10320a0/App/cpanminus/script.pm line 1.
> cannot remove directory for
> /Users/subinoybiswas/.cpanm/work/1383165137.7601: Directory not empty at
> /loader/0x7fd8d10320a0/App/cpanminus/script.pm line 1.

Those errors suggest something is messed up in your ~/.cpanm directory
hierarchy. If I had to bet, I'd bet that you ran something as root,
once upon a time, and the above errors are from root-owned files that
got produced at that point.

You should just be able to 'rm -rfv ~/.cpanm' without issue.


j.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




perlbrew error

2014-06-15 Thread Subinoy Biswas
Hi,
I am having a trouble installing any module with cpanm in perlbrew  perl-5.20.0 
in an test1 local lib. Below I am pasting the verbose. Please help me to solve 
this issue.subinoybiswas@sunymacs:~/work_ubc/seq$ which perl
/Users/subinoybiswas/perl5/perlbrew/perls/perl-5.20.0/bin/perl
subinoybiswas@sunymacs:~/work_ubc/seq$ perl -v

This is perl 5, version 20, subversion 0 (v5.20.0) built for darwin-2level

Copyright 1987-2014, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

subinoybiswas@sunymacs:~/work_ubc/seq$ perl -V
Summary of my perl5 (revision 5 version 20 subversion 0) configuration:

 Platform:
   osname=darwin, osvers=11.4.2, archname=darwin-2level
   uname='darwin sunymacs.local 11.4.2 darwin kernel version 11.4.2: thu aug 23 
16:25:48 pdt 2012; root:xnu-1699.32.7~1release_x86_64 x86_64 '
   config_args='-de 
-Dprefix=/Users/subinoybiswas/perl5/perlbrew/perls/perl-5.20.0 
-Aeval:scriptdir=/Users/subinoybiswas/perl5/perlbrew/perls/perl-5.20.0/bin'
   hint=recommended, useposix=true, d_sigaction=define
   useithreads=undef, usemultiplicity=undef
   use64bitint=define, use64bitall=define, uselongdouble=undef
   usemymalloc=n, bincompat5005=undef
 Compiler:
   cc='cc', ccflags ='-fno-common -DPERL_DARWIN -fwrapv -fno-strict-aliasing 
-pipe -fstack-protector -I/usr/local/include',
   optimize='-O3',
   cppflags='-fno-common -DPERL_DARWIN -fwrapv -fno-strict-aliasing -pipe 
-fstack-protector -I/usr/local/include'
   ccversion='', gccversion='4.8.3', gccosandvers=''
   intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
   d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
   ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
   alignbytes=8, prototype=define
 Linker and Libraries:
   ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-protector 
-L/usr/local/lib'
   libpth=/usr/local/lib 
/usr/local/Cellar/gcc48/4.8.3/lib/gcc/x86_64-apple-darwin11.4.2/4.8.3/include-fixed
 /usr/lib
   libs=-lgdbm -ldbm -ldl -lm -lutil -lc
   perllibs=-ldl -lm -lutil -lc
   libc=, so=dylib, useshrplib=false, libperl=libperl.a
   gnulibc_version=''
 Dynamic Linking:
   dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
   cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup 
-L/usr/local/lib -fstack-protector'


Characteristics of this binary (from libperl): 
 Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
   PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
   PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
   USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES
   USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
   USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
 Built under darwin
 Compiled at Jun  6 2014 11:45:46
 %ENV:
   
PERL5LIB="/Users/subinoybiswas/.perlbrew/libs/perl-5.20.0@test1/lib/perl5:/Users/subinoybiswas/perl5/lib/perl5"
   PERLBREW_BASHRC_VERSION="0.58"
   PERLBREW_HOME="/Users/subinoybiswas/.perlbrew"
   PERLBREW_LIB="test1"
   
PERLBREW_MANPATH="/Users/subinoybiswas/.perlbrew/libs/perl-5.20.0@test1/man:/Users/subinoybiswas/perl5/perlbrew/perls/perl-5.20.0/man"
   
PERLBREW_PATH="/Users/subinoybiswas/.perlbrew/libs/perl-5.20.0@test1/bin:/Users/subinoybiswas/perl5/perlbrew/bin:/Users/subinoybiswas/perl5/perlbrew/perls/perl-5.20.0/bin"
   PERLBREW_PERL="perl-5.20.0"
   PERLBREW_ROOT="/Users/subinoybiswas/perl5/perlbrew"
   PERLBREW_VERSION="0.59"
   PERL_LOCAL_LIB_ROOT="/Users/subinoybiswas/.perlbrew/libs/perl-5.20.0@test1"
   PERL_MB_OPT="--install_base 
/Users/subinoybiswas/.perlbrew/libs/perl-5.20.0@test1"
   
PERL_MM_OPT="INSTALL_BASE=/Users/subinoybiswas/.perlbrew/libs/perl-5.20.0@test1"
 @INC:
   /Users/subinoybiswas/.perlbrew/libs/perl-5.20.0@test1/lib/perl5
   /Users/subinoybiswas/perl5/lib/perl5/darwin-2level
   /Users/subinoybiswas/perl5/lib/perl5
   
/Users/subinoybiswas/perl5/perlbrew/perls/perl-5.20.0/lib/site_perl/5.20.0/darwin-2level
   /Users/subinoybiswas/perl5/perlbrew/perls/perl-5.20.0/lib/site_perl/5.20.0
   
/Users/subinoybiswas/perl5/perlbrew/perls/perl-5.20.0/lib/5.20.0/darwin-2level
   /Users/subinoybiswas/perl5/perlbrew/perls/perl-5.20.0/lib/5.20.0
   .
subinoybiswas@sunymacs:~/work_ubc/seq$ vi cds_7_25.pl 
subinoybiswas@sunymacs:~/wo

RE: Perlbrew and Apache2::Request

2013-06-20 Thread Rodney Simioni
 

I looked at INSTALL file and it said to './configure
--with-apache2-apxs=/path/to/apache2/bin/apxs'.

 

Well, if you are a non-admin user trying to write/modify to apxs or
those other files that might be owned by root, then you might have
issues.

 

My two cents.

 

From: Dermot [mailto:paik...@gmail.com] 
Sent: Thursday, June 20, 2013 7:53 AM
To: Perl Beginners
Subject: Perlbrew and Apache2::Request

 

 

Hi,

OS CentOS 6.3

perl=/home/dermot/perl5/perlbrew/perls/perl-5.16.0/bin/perl,

  %ENV:
PERLBREW_BASHRC_VERSION="0.64"
PERLBREW_HOME="/home/dpaikkos/.perlbrew"
 
PERLBREW_MANPATH="/home/dpaikkos/perl5/perlbrew/perls/perl-5.16.0/man"
 
PERLBREW_PATH="/home/dpaikkos/perl5/perlbrew/bin:/home/dpaikkos/perl5/pe
rlbrew/perls/perl-5.16.0/bin"
PERLBREW_PERL="perl-5.16.0"
PERLBREW_ROOT="/home/dpaikkos/perl5/perlbrew"
PERLBREW_VERSION="0.64"
  @INC:
 
/home/dpaikkos/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/x86
_64-linux
/home/dpaikkos/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0
 
/home/dpaikkos/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0/x86_64-linux
/home/dpaikkos/perl5/perlbrew/perls/perl-5.16.0/lib/5



I have installed perlbrew and cpanm. I have been trying to get a number
of modules installed but have come un-stuck with Apache2::Request. I
have posted the buildlog from the cpanm build below.

I have tried to manually ./configure the package but I am fairly certain
that I am not using the correct options that will get the package
installed where my perl binary can see it. The last configure options I
gave where:

./configure
--with-perl=/home/dermot/perl5/perlbrew/perls/perl-5.16.0/bin/perl
--enable-perl-glue --with-apache2-apxs=/usr/sbin/apxs
--with-apache2-httpd=/usr/sbin/http

When I make install, I get permission denied and have to use sudo which
should not be happening.

Below are the configure , can anyone offer any advice?

Thanks in advance,

Dermot.

=== Configure options 
Configuration:
  -h, --help  display this help and exit
  --help=shortdisplay options specific to this package
  --help=recursivedisplay the short help of all the included
packages
  -V, --version   display version information and exit
  -q, --quiet, --silent   do not print `checking...' messages
  --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache  alias for `--cache-file=config.cache'
  -n, --no-create do not create output files
  --srcdir=DIRfind the sources in DIR [configure dir or
`..']

Installation directories:
  --prefix=PREFIX install architecture-independent files in
PREFIX
  [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in
EPREFIX
  [PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR   user executables [EPREFIX/bin]
  --sbindir=DIR  system admin executables [EPREFIX/sbin]
  --libexecdir=DIR   program executables [EPREFIX/libexec]
  --sysconfdir=DIR   read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR   modifiable architecture-independent data
[PREFIX/com]
  --localstatedir=DIRmodifiable single-machine data [PREFIX/var]
  --libdir=DIR   object code libraries [EPREFIX/lib]
  --includedir=DIR   C header files [PREFIX/include]
  --oldincludedir=DIRC header files for non-gcc [/usr/include]
  --datarootdir=DIR  read-only arch.-independent data root
[PREFIX/share]
  --datadir=DIR  read-only architecture-independent data
[DATAROOTDIR]
  --infodir=DIR  info documentation [DATAROOTDIR/info]
  --localedir=DIRlocale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR   man documentation [DATAROOTDIR/man]
  --docdir=DIR   documentation root [DATAROOTDIR/doc/libapreq2]
  --htmldir=DIR  html documentation [DOCDIR]
  --dvidir=DIR   dvi documentation [DOCDIR]
  --pdfdir=DIR   pdf documentation [DOCDIR]
  --psdir=DIRps documentation [DOCDIR]

Program names:
  --program-prefix=PREFIXprepend PREFIX to installed program
names
  --program-suffix=SUFFIXappend SUFFIX to installed program
names
  --program-transform-name=PROGRAM   run sed PROGRAM on installed
program names

System types:
  --build=BUILD configure for building on BUILD [guessed]
  --host=HOST   cross-compile to build programs to run on HOST
[BUILD]

Optional Features:
  --disable-FEATURE   do not include FEATURE (same as
--enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FE

Perlbrew and Apache2::Request

2013-06-20 Thread Dermot
Hi,

OS CentOS 6.3
perl=/home/dermot/perl5/perlbrew/perls/perl-5.16.0/bin/perl,
  %ENV:
PERLBREW_BASHRC_VERSION="0.64"
PERLBREW_HOME="/home/dpaikkos/.perlbrew"
PERLBREW_MANPATH="/home/dpaikkos/perl5/perlbrew/perls/perl-5.16.0/man"

PERLBREW_PATH="/home/dpaikkos/perl5/perlbrew/bin:/home/dpaikkos/perl5/perlbrew/perls/perl-5.16.0/bin"
PERLBREW_PERL="perl-5.16.0"
PERLBREW_ROOT="/home/dpaikkos/perl5/perlbrew"
PERLBREW_VERSION="0.64"
  @INC:

/home/dpaikkos/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/x86_64-linux
/home/dpaikkos/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0
/home/dpaikkos/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0/x86_64-linux
/home/dpaikkos/perl5/perlbrew/perls/perl-5.16.0/lib/5


I have installed perlbrew and cpanm. I have been trying to get a number of
modules installed but have come un-stuck with Apache2::Request. I have
posted the buildlog from the cpanm build below.

I have tried to manually ./configure the package but I am fairly certain
that I am not using the correct options that will get the package installed
where my perl binary can see it. The last configure options I gave where:

./configure
--with-perl=/home/dermot/perl5/perlbrew/perls/perl-5.16.0/bin/perl
--enable-perl-glue --with-apache2-apxs=/usr/sbin/apxs
--with-apache2-httpd=/usr/sbin/http

When I make install, I get permission denied and have to use sudo which
should not be happening.

Below are the configure , can anyone offer any advice?
Thanks in advance,
Dermot.

=== Configure options 
Configuration:
  -h, --help  display this help and exit
  --help=shortdisplay options specific to this package
  --help=recursivedisplay the short help of all the included
packages
  -V, --version   display version information and exit
  -q, --quiet, --silent   do not print `checking...' messages
  --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache  alias for `--cache-file=config.cache'
  -n, --no-create do not create output files
  --srcdir=DIRfind the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX install architecture-independent files in PREFIX
  [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  [PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR   user executables [EPREFIX/bin]
  --sbindir=DIR  system admin executables [EPREFIX/sbin]
  --libexecdir=DIR   program executables [EPREFIX/libexec]
  --sysconfdir=DIR   read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR   modifiable architecture-independent data
[PREFIX/com]
  --localstatedir=DIRmodifiable single-machine data [PREFIX/var]
  --libdir=DIR   object code libraries [EPREFIX/lib]
  --includedir=DIR   C header files [PREFIX/include]
  --oldincludedir=DIRC header files for non-gcc [/usr/include]
  --datarootdir=DIR  read-only arch.-independent data root
[PREFIX/share]
  --datadir=DIR  read-only architecture-independent data
[DATAROOTDIR]
  --infodir=DIR  info documentation [DATAROOTDIR/info]
  --localedir=DIRlocale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR   man documentation [DATAROOTDIR/man]
  --docdir=DIR   documentation root [DATAROOTDIR/doc/libapreq2]
  --htmldir=DIR  html documentation [DOCDIR]
  --dvidir=DIR   dvi documentation [DOCDIR]
  --pdfdir=DIR   pdf documentation [DOCDIR]
  --psdir=DIRps documentation [DOCDIR]

Program names:
  --program-prefix=PREFIXprepend PREFIX to installed program
names
  --program-suffix=SUFFIXappend SUFFIX to installed program
names
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program
names

System types:
  --build=BUILD configure for building on BUILD [guessed]
  --host=HOST   cross-compile to build programs to run on HOST [BUILD]

Optional Features:
  --disable-FEATURE   do not include FEATURE (same as
--enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --disable-dependency-tracking  speeds up one-time build
  --enable-dependency-tracking   do not reject slow dependency extractors
  --enable-shared[=PKGS]  build shared libraries [default=yes]
  --enable-static[=PKGS]  build static libraries [default=yes]
  --enable-fast-install[=PKGS]
  optimize for fast installation [default=yes]
  --disable-libtool-lock  avoid locking (might 

Re: Can I use perlbrew to install to /usr/share/perl?

2013-04-13 Thread Jim Gibson

On Apr 13, 2013, at 10:11 AM, Sherman Willden wrote:

> I installed perlbrew then I used it to install v5.16.3. That installed to
> my home directory. I read about installing to /opt. Do I just substitute
> /usr/share/perl where I presently have v5.14.2 for /oopt? Will that also
> install to all the other required places? Will it install the perl
> executable to /usr/bin? Do I really want to install v5.16.3 to the default
> location?

It is generally best to let perlbrew install to its default locations. That 
way, you don't interfere with any previously-installed Perl versions. If 
perlbrew doesn't end up working for you, you can uninstall it and fall back to 
your older versions.

One drawback is that you have to install optional modules for each version 
separately. You also have to pay attention to which version you are using, or 
you might end up using the wrong one (although Perl developers have done a 
pretty good job of backwards compatibility, so that if you do end up using a 
version unexpectedly, it will either work OK or complain immediately that your 
Perl program is not compatible.)
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Can I use perlbrew to install to /usr/share/perl?

2013-04-13 Thread Sherman Willden
I installed perlbrew then I used it to install v5.16.3. That installed to
my home directory. I read about installing to /opt. Do I just substitute
/usr/share/perl where I presently have v5.14.2 for /oopt? Will that also
install to all the other required places? Will it install the perl
executable to /usr/bin? Do I really want to install v5.16.3 to the default
location?

Thank you;

Sherman


Re: Problem Installing perlbrew [solved]

2013-03-21 Thread James Griffin
[- Wed 20.Mar'13 at 11:57:55 -0700  Angela Barone :-]

>   Thank you to everyone who replied off-list.  It turns out that version 
> 0.60 had a problem which manifested itself in strange ways.  As we were 
> trying to figure out what was going on,  version 0.61 was released.  The new 
> version seems to have fixed the problem.  :)
> 
>   Thanks again for everyone's help.

There's a new version of iTerm as well - I assumed you were referring to a 
newer version of perlbrew - and also just check in preferences -> profiles -> 
general that you've selected the "Login Shell" box so it runs bash as a login 
shell.

-- 
James Griffin:  jmz at kontrol.kode5.net 
jmzgriffin at gmail.com

A4B9 E875 A18C 6E11 F46D  B788 BEE6 1251 1D31 DC38

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Problem Installing perlbrew [solved]

2013-03-20 Thread Angela Barone
Thank you to everyone who replied off-list.  It turns out that version 
0.60 had a problem which manifested itself in strange ways.  As we were trying 
to figure out what was going on,  version 0.61 was released.  The new version 
seems to have fixed the problem.  :)

Thanks again for everyone's help.

Angela

A2 Hosting now has Perl 5.10.1
http://www.a2hosting.com/1250.html




--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Problem Installing perlbrew

2013-03-20 Thread Brandon McCaig
On Wed, Mar 20, 2013 at 10:22:04AM -0400, Brandon McCaig wrote:
> Is it possible that it's not running bash, and
> therefore your .bash_profile is not being sourced, and therefore
> the Perlbrew environment is not being set up?

Nevermind...

On Tue, Mar 19, 2013 at 11:42:56AM -0700, Angela Barone wrote:
> But if I tried iTerm, then I got the "-bash: perlbrew: command
> not found" error.

I'm going back to bed. >_>

Regards,

-- 
Brandon McCaig  
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bamccaig.com/>
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.};
tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say'



signature.asc
Description: Digital signature


Re: Problem Installing perlbrew

2013-03-20 Thread Brandon McCaig
Angela Barone:

On Tue, Mar 19, 2013 at 11:42:56AM -0700, Angela Barone wrote:
> I tried that, but it didn't work.  It turns out that when I
> used OS X's Terminal, everything installed smoothly.  But if I
> tried iTerm, then I got the "-bash: perlbrew: command not
> found" error.  This makes no sense to me.  I thought both
> should operate identically, but apparently not.
> 
> If anyone knows how to get perlbrew to work in iTerm, I'd
> appreciate hearing from you.

I am not familiar with iTerm, but Google reveals that it is an
open source terminal emulator for OS X. So what probably matters
here is the shell that it is running (I would assume it would be
the same shell as your other terminal emulator program, but
perhaps not..). Is it possible that it's not running bash, and
therefore your .bash_profile is not being sourced, and therefore
the Perlbrew environment is not being set up?

What if you try sourcing the perlbrew bashrc yourself directly
from iTerm:

source ~/perl5/perlbrew/etc/bashrc

Does that execute without errors? Does perlbrew work then?

As an aside, I have found that recent versions of bash (in
GNU/Linux) seem to cache the PATH and not notice changes to it
right away (albeit, you said you were upgrading Perlbrew so I
don't think it would have changed much, but I digress). You can
clear that cache with `hash -r' from the affected shell. You can
also just start a new shell. I doubt this is applicable to your
situation, but you never know... :)

Regards,

-- 
Brandon McCaig  
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bamccaig.com/>
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.};
tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say'



signature.asc
Description: Digital signature


Re: Problem Installing perlbrew

2013-03-19 Thread Angela Barone
On Mar 19, 2013, at 10:48 AM, Jim Gibson wrote:
> Try changing that line to:
> source /Users/mbo/perl5/perlbrew/etc/bashrc
> 
> or just go back to what you had before:
> source ~/perl5/perlbrew/etc/bashrc

I tried that, but it didn't work.  It turns out that when I used OS X's 
Terminal, everything installed smoothly.  But if I tried iTerm, then I got the 
"-bash: perlbrew: command not found" error.  This makes no sense to me.  I 
thought both should operate identically, but apparently not.

If anyone knows how to get perlbrew to work in iTerm, I'd appreciate 
hearing from you.

Thanks again,
Angela

-

A2 Hosting now has Perl 5.10.1
http://www.a2hosting.com/1250.html






Re: Problem Installing perlbrew

2013-03-19 Thread Jim Gibson

On Mar 19, 2013, at 10:37 AM, Angela Barone wrote:

>   I'm hoping someone can help me.  I upgraded perlbrew by re-installing 
> it via the curl method and now I can't use it anymore.  I'm getting the error 
> "-bash: perlbrew: command not found".
> 
>   Here's what the installation report showed:
> 
> ## Installing perlbrew
> perlbrew is installed: "/Users/mbo/perl5/perlbrew";/bin/perlbrew
> 
> perlbrew root ("/Users/mbo/perl5/perlbrew";) is initialized.
> 
> Append the following piece of code to the end of your ~/.bash_profile and 
> start a
> new shell, perlbrew should be up and fully functional from there:
> 
>source "/Users/mbo/perl5/perlbrew";/etc/bashrc

Try changing that line to:

source /Users/mbo/perl5/perlbrew/etc/bashrc


or just go back to what you had before:

source ~/perl5/perlbrew/etc/bashrc


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Problem Installing perlbrew

2013-03-19 Thread Angela Barone
I'm hoping someone can help me.  I upgraded perlbrew by re-installing 
it via the curl method and now I can't use it anymore.  I'm getting the error 
"-bash: perlbrew: command not found".

Here's what the installation report showed:
----
## Installing perlbrew
perlbrew is installed: "/Users/mbo/perl5/perlbrew";/bin/perlbrew

perlbrew root ("/Users/mbo/perl5/perlbrew";) is initialized.

Append the following piece of code to the end of your ~/.bash_profile and start 
a
new shell, perlbrew should be up and fully functional from there:

source "/Users/mbo/perl5/perlbrew";/etc/bashrc

Simply run `perlbrew` for usage details.

Happy brewing!
## Installing patchperl
## Done.


In my .bash_profile, I previously had entered "source 
~/perl5/perlbrew/etc/bashrc".  So I changed it to what it says above "source 
"/Users/mbo/perl5/perlbrew";/etc/bashrc" but that caused other problems in my 
terminal, such as:

Last login: Tue Mar 19 10:29:29 on ttys001
-bash: source: /Users/mbo/perl5/perlbrew: is a directory
-bash: /etc/bashrc: Permission denied

The first time I installed it, there were no problems, and now this.

Does anyone have any experience with this?

Thank you,
Angela

-

A2 Hosting now has Perl 5.10.1





Re: Error Message on Perlbrew Install

2012-06-18 Thread Kristin Johnson
I am using Microsoft Windows XP 2002.  I was in Git version 1.7.10.  I
don't remember seeing an option to install any missing modules...at least
for the Perlbrew.  Where would I find that?
Thanks!!
KJ
(Sorry, I should have replied all)

On Sun, Jun 17, 2012 at 12:42 AM, Andy Bach  wrote:

> >   I am getting the error message: "can't locate Pod/Usage.pm
>
> Usually means you just don't have that module ("Pod::Usage") installed.
> You want to to tell us what platform/OS you're on (eg windows XP or 7 and
> ActiveState or Strawberry or Ubuntu and ver. 5.12) but you probably need to
> add that and try again.
>
> Often these installs will have an option to install any missing modules as
> part of the install process, saying yes to that's an okay thing.
>
>  a
>
> Andy Bach
> (608) 658-1890
> Not at my desk
>
> On Jun 16, 2012, at 9:20 AM, MallHair  wrote:
>
> > Hello,
> > I don't know if I should ask this here.  I'm having trouble installing
> > Perlbrew.  I am getting the error message: "can't locate Pod/Usage.pm
> > in @INC (@INC contains: CODE(0xa031ea8) /usr/lib/perl5/5.8.8/msys /usr/
> > lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/msys /usr/lib/perl5/
> > site_perl/5.8.8 /usr/lib/perl5/site_perl .) at /loader/0xa031ea8/App/
> > perlbrew.pm line 232."
> > I have been trying to find an answer and I saw one that his problem
> > was that the file was called pod instead of Pod.  (S)He just renamed
> > the file.  How do I do that?  Or is there another way to fix this?  Or
> > am I in the wrong place completely?
> > Any help would be very much appreciated.
> > Thank you.
> >
> >
> > --
> > To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> > For additional commands, e-mail: beginners-h...@perl.org
> > http://learn.perl.org/
> >
> >
>


Re: Error Message on Perlbrew Install

2012-06-16 Thread Andy Bach
>   I am getting the error message: "can't locate Pod/Usage.pm

Usually means you just don't have that module ("Pod::Usage") installed. You 
want to to tell us what platform/OS you're on (eg windows XP or 7 and 
ActiveState or Strawberry or Ubuntu and ver. 5.12) but you probably need to add 
that and try again. 

Often these installs will have an option to install any missing modules as part 
of the install process, saying yes to that's an okay thing. 

  a

Andy Bach
(608) 658-1890
Not at my desk

On Jun 16, 2012, at 9:20 AM, MallHair  wrote:

> Hello,
> I don't know if I should ask this here.  I'm having trouble installing
> Perlbrew.  I am getting the error message: "can't locate Pod/Usage.pm
> in @INC (@INC contains: CODE(0xa031ea8) /usr/lib/perl5/5.8.8/msys /usr/
> lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/msys /usr/lib/perl5/
> site_perl/5.8.8 /usr/lib/perl5/site_perl .) at /loader/0xa031ea8/App/
> perlbrew.pm line 232."
> I have been trying to find an answer and I saw one that his problem
> was that the file was called pod instead of Pod.  (S)He just renamed
> the file.  How do I do that?  Or is there another way to fix this?  Or
> am I in the wrong place completely?
> Any help would be very much appreciated.
> Thank you.
> 
> 
> -- 
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
> 
> 

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Error Message on Perlbrew Install

2012-06-16 Thread MallHair
Hello,
I don't know if I should ask this here.  I'm having trouble installing
Perlbrew.  I am getting the error message: "can't locate Pod/Usage.pm
in @INC (@INC contains: CODE(0xa031ea8) /usr/lib/perl5/5.8.8/msys /usr/
lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/msys /usr/lib/perl5/
site_perl/5.8.8 /usr/lib/perl5/site_perl .) at /loader/0xa031ea8/App/
perlbrew.pm line 232."
I have been trying to find an answer and I saw one that his problem
was that the file was called pod instead of Pod.  (S)He just renamed
the file.  How do I do that?  Or is there another way to fix this?  Or
am I in the wrong place completely?
Any help would be very much appreciated.
Thank you.


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Using perlbrew to change Perl version for scripts

2012-06-03 Thread Shawn H Corey

On 12-06-03 06:00 PM, Octavian Rasnita wrote:

The cron jobs don't use the system Perl, but they use the first Perl
found in PATH.
If those cron jobs won't find any Perl in PATH, they won't run at all.
And you, or Perlbrew or somebody else should set a default PATH for the
shell which is used by the cron jobs if you want a certain version of
Perl to be run.


According to crontab(5), /usr/bin/perl

Copy the attached to your bin and add this line to the top of your 
crontab file:


SHELL=/bin/bash

Then change each Perl entry to:

* * * * * /home/my_username/bin/init_perlbrew.sh my_script.pl arg1 arg2

Replacing the asterisks, my_username, my_script.pl, and its arguments 
with the appropriate values.


Now, when you `perlbrew switch`, the next time a cron(8) job starts, it 
will run under the switched perl. Those currently running will not 
changed; they would have to be stopped and restarted.



--
Just my 0.0002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

_Perl links_
official site   : http://www.perl.org/
beginners' help : http://learn.perl.org/faq/beginners.html
advance help: http://perlmonks.org/
documentation   : http://perldoc.perl.org/
news: http://perlsphere.net/
repository  : http://www.cpan.org/
blog: http://blogs.perl.org/
regional groups : http://www.pm.org/


init_perlbrew.sh
Description: application/shellscript
-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Re: Using perlbrew to change Perl version for scripts

2012-06-03 Thread Octavian Rasnita

From: 
Subject: Re: Using perlbrew to change Perl version for scripts


On Jun 3, 2012, at 6:06 AM, Octavian Rasnita wrote:


but a user has only a single cron job so it is not such a big issue.


And therein lies the rub.  Why can't perlbrew do that for us automatically? 
perlbrew switch XXX... and you're done!


Your solution makes sense if you only change versions once a year when Perl 
is upgraded, but my original inquiry was for testing purposes.  If you want 
to test all your scripts with different versions of Perl, making only one 
change in perlbrew would be sooo nice.  It does it for the command line - 
why not for the shebang line?




For the testing purposes, when you might need to change the version of Perl 
very often for testing some programs, Perlbrew can help you because you can 
run the programs in command line. But I guess you don't want to set cron 
jobs and keep changing the version of Perl. You can test those programs in 
command line, and after that configure cron with the version of perl you 
choose.


The cron jobs don't use the system Perl, but they use the first Perl found 
in PATH.
If those cron jobs won't find any Perl in PATH, they won't run at all. And 
you, or Perlbrew or somebody else should set a default PATH for the shell 
which is used by the cron jobs if you want a certain version of Perl to be 
run.


If somebody knows where it keeps the configuration settings the shell which 
is used by cron, then she or he might ask Perlbrew's author to also make 
changes in that configuration file also (if there is one), and then the 
changes will also work in cron jobs without needing to manually set the 
PERL5LIB and the PATH there.


Octavian


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Using perlbrew to change Perl version for scripts

2012-06-03 Thread Shawn H Corey

On 12-06-03 04:17 PM, Bill Stephenson wrote:

I'm thinking that'd require something like a dispatcher that sits between your 
scripts and the perls you want to use.


It does. That's why it only works from a terminal. The dispatcher is 
place in your .profile. Scripts started outside a terminal use the 
system perl.



--
Just my 0.0002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

_Perl links_
official site   : http://www.perl.org/
beginners' help : http://learn.perl.org/faq/beginners.html
advance help: http://perlmonks.org/
documentation   : http://perldoc.perl.org/
news: http://perlsphere.net/
repository  : http://www.cpan.org/
blog: http://blogs.perl.org/
regional groups : http://www.pm.org/

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Using perlbrew to change Perl version for scripts

2012-06-03 Thread Bill Stephenson
I get what Marc is wanting, and I see the convenience of it. 

Perlbrew allows you to install different versions of perl so you can test your 
code with them. I'd be handy to be able to test a batch of scripts without 
having to change the shebang line in each one. 

I'm thinking that'd require something like a dispatcher that sits between your 
scripts and the perls you want to use. 

Kindest Regards,

Bill Stephenson



--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Using perlbrew to change Perl version for scripts

2012-06-03 Thread sono-io
On Jun 3, 2012, at 11:18 AM, Paul Johnson wrote:

> I'm sure gugod doesn't need a dozen people asking him the same thing.

If I'm the only one who wants this, then it won't be a priority for him 
- and it shouldn't be.  However if enough people want it, maybe he'll do it.

>> It does it for the command line - why not for the shebang line?
> doesn't make a lot of sense to me.  

All I'm after is the ability to use a shebang line that will always 
point to the currently selected version of Perl that I've chosen by the 
perlbrew switch command.  If I use #!/usr/bin/env perl, my system Perl gets 
used - no matter what perlbrew is set to.  If I hard-code a perlbrew installed 
version of Perl, then that particular version gets used.  I'd like to be able 
to use some generic shebang line, something like 
#!~/perl5/perlbrew/bin/current, and then that script would use the currently 
selected version of Perl.  Now when I change versions with perlbrew, I don't 
have to change any shebang line.

> I don't think you really want that (some important programs on your system 
> may stop working).

What I'm asking for would not interfere with any system files.

> Are you actually looking for this?
> $ perlbrew exec perl my_snazzy_program.pl

Nope.  Let's use my shopping cart script as an example.  Running MAMP 
on my Mac, and using a browser to access the script, I want to select different 
versions of Perl to test it with, using perlbrew, to make sure it will work no 
matter what version of Perl is running.

I referenced this page yesterday where someone asked pretty much the 
same thing last year:

https://github.com/gugod/App-perlbrew/issues/70

Marc


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Using perlbrew to change Perl version for scripts

2012-06-03 Thread Paul Johnson
On Sun, Jun 03, 2012 at 10:53:08AM -0700, sono...@fannullone.us wrote:
> On Jun 3, 2012, at 6:06 AM, Octavian Rasnita wrote:
> 
> > but a user has only a single cron job so it is not such a big issue.
> 
>   And therein lies the rub.  Why can't perlbrew do that for us 
> automatically?  perlbrew switch XXX... and you're done!
> 
>   Your solution makes sense if you only change versions once a year when 
> Perl is upgraded, but my original inquiry was for testing purposes.  If you 
> want to test all your scripts with different versions of Perl, making only 
> one change in perlbrew would be sooo nice.  It does it for the command line - 
> why not for the shebang line?
> 
>   I've written the author to ask for this.  For those who agree and would 
> like to do the same, here's his e-mail address:  gu...@gugod.org

I'm sure gugod doesn't need a dozen people asking him the same thing.
Why not wait until you get a reply?

But I've read through this whole thread a couple of times and I'm still
not sure what you are after, so I hope you've explained it better to
him.  Or perhaps that's just my problem.  But your question:

> It does it for the command line - why not for the shebang line?

doesn't make a lot of sense to me.  Are you asking why perlbrew can't
make a shebang line that points to your system perl (wherever that might
be) instead execute whatever perl you've "switch"ed to?  If you are, I
don't think you really want that (some important programs on your system
may stop working).  If not, what are you asking?

Are you actually looking for this?

$ perlbrew exec perl my_snazzy_program.pl

-- 
Paul Johnson - p...@pjcj.net
http://www.pjcj.net

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Using perlbrew to change Perl version for scripts

2012-06-03 Thread sono-io
On Jun 3, 2012, at 6:06 AM, Octavian Rasnita wrote:

> but a user has only a single cron job so it is not such a big issue.

And therein lies the rub.  Why can't perlbrew do that for us 
automatically?  perlbrew switch XXX... and you're done!

Your solution makes sense if you only change versions once a year when 
Perl is upgraded, but my original inquiry was for testing purposes.  If you 
want to test all your scripts with different versions of Perl, making only one 
change in perlbrew would be sooo nice.  It does it for the command line - why 
not for the shebang line?

I've written the author to ask for this.  For those who agree and would 
like to do the same, here's his e-mail address:  gu...@gugod.org

Marc
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Using perlbrew to change Perl version for scripts

2012-06-03 Thread Octavian Rasnita

From: "Shawn H Corey" 
Subject: Re: Using perlbrew to change Perl version for scripts



On 12-06-03 03:01 AM, Octavian Rasnita wrote:

So for running cron jobs with a version of Perl installed by Perlbrew, I
just needed to add the following lines at the start of cron script:

PERL5LIB=/home/teddy/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2:/home/teddy/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2


PATH=/home/teddy/perl5/perlbrew/bin:/home/teddy/perl5/perlbrew/perls/perl-5.14.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin


That's all.

The advantage is that when you'll install a new version of Perl with
Perlbrew, you will just need to change 2 lines in cron, and not all the
Perl programs.


Which you have to do for every cron script. And you're not using perlbrew; 
you're bypassing it and doing one of its task manually. To use perlbrew in 
your cron scripts, replace the above two lines with:


# perlbrew
if [ -e /home/teddy/perl5/perlbrew/etc/bashrc ]
then
source /home/teddy/perl5/perlbrew/etc/bashrc
fi

Now, after you do a `perlbrew switch ...` the next time the cron script 
starts, it will use the new perl. Which is what using perlbrew means; the 
ability to change the perl version without changing all your scripts.







I tried that, but it gives an error:

"/tmp/crontab.YkxBxg/crontab":6: bad minute

the if [ ... ] line doesn't seem to be accepted in cron jobs.

So without this feature, yes, we might need to change a few chars in 2 lines 
in every cron script, but a user has only a single cron job so it is not 
such a big issue.


Octavian


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Using perlbrew to change Perl version for scripts

2012-06-03 Thread Shawn H Corey

On 12-06-03 03:01 AM, Octavian Rasnita wrote:

So for running cron jobs with a version of Perl installed by Perlbrew, I
just needed to add the following lines at the start of cron script:

PERL5LIB=/home/teddy/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2:/home/teddy/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2


PATH=/home/teddy/perl5/perlbrew/bin:/home/teddy/perl5/perlbrew/perls/perl-5.14.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin


That's all.

The advantage is that when you'll install a new version of Perl with
Perlbrew, you will just need to change 2 lines in cron, and not all the
Perl programs.


Which you have to do for every cron script. And you're not using 
perlbrew; you're bypassing it and doing one of its task manually. To use 
perlbrew in your cron scripts, replace the above two lines with:


# perlbrew
if [ -e /home/teddy/perl5/perlbrew/etc/bashrc ]
then
source /home/teddy/perl5/perlbrew/etc/bashrc
fi

Now, after you do a `perlbrew switch ...` the next time the cron script 
starts, it will use the new perl. Which is what using perlbrew means; 
the ability to change the perl version without changing all your scripts.



--
Just my 0.0002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

_Perl links_
official site   : http://www.perl.org/
beginners' help : http://learn.perl.org/faq/beginners.html
advance help: http://perlmonks.org/
documentation   : http://perldoc.perl.org/
news: http://perlsphere.net/
repository  : http://www.cpan.org/
blog: http://blogs.perl.org/
regional groups : http://www.pm.org/

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Using perlbrew to change Perl version for scripts

2012-06-03 Thread Octavian Rasnita

From: "Chris Nehren" 
Subject: Re: Using perlbrew to change Perl version for scripts



On Sat, Jun 02, 2012 at 12:57:22 -0400 , Shawn H Corey wrote:

On 12-06-02 12:23 PM, sono...@fannullone.us wrote:
> Is it possible to use a shebang line, like #!/usr/bin/env perl, so
> that scripts will use the currently selected version of Perl with
> perlbrew?  According to the help, it appears that perlbrew only
> changes the version for the CLI:
>
>
>COMMAND: SWITCH
> Usage: perlbrew switch [  ]
>
> Switch to the given version, and makes it the default for this and 
> all

> future terminal sessions.
>
>
> Right now, I'm hardcoding the version of Perl in my scripts, like:
>
>#!/Users/marc/perl5/perlbrew/perls/perl-5.16.0/bin/perl
>
>but it's an inconvenience to change the shebang line in all my
>scripts just to try a different version.  It would be nice if
>perlbrew took care of that as well.
>
> It seems like it should do this automatically, so maybe I don't have
> something set up correctly, but googling hasn't helped.
>
>Thanks,
>Marc

I don't know anything inside perlbrew that will help, but you could do 
this:


sudo ln -s /Users/marc/perl5/perlbrew/perls/perl-5.16.0/bin/perl
/usr/local//bin/perl

Then change your shebangs to: #!/usr/local/bin/perl

This has the advantage of not having to run your profile to get the
correct version of perl and when you upgrade, you just have to change
the symlink to upgrade all your scripts.


And the disadvantage of clobbering whatever's in /usr/local/bin/perl,
defeating the point of perlbrew in the first place.

Don't do that.

Yes, the `#!/usr/bin/env perl` shebang should do. I've used it with
perlbrew myself.

--
Chris Nehren   | Coder, Sysadmin, Masochist
Shadowcat Systems Ltd. | http://shadowcat.co.uk/





Yes I also use that way with Perlbrew and it works fine even for the jobs 
run by cron.
So the beginners shouldn't be confused by telling them that Perlbrew can't 
be used to run cron jobs.


When using the
#!/usr/bin/env perl
shebang line, the program runs with the first perl installation found in 
PATH, so the user just needs to ensure that the wanted installation of Perl 
is in PATH and that its lib directories are set in the PERL5LIB environment 
variable.


So for running cron jobs with a version of Perl installed by Perlbrew, I 
just needed to add the following lines at the start of cron script:


PERL5LIB=/home/teddy/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2:/home/teddy/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2

PATH=/home/teddy/perl5/perlbrew/bin:/home/teddy/perl5/perlbrew/perls/perl-5.14.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

That's all.

The advantage is that when you'll install a new version of Perl with 
Perlbrew, you will just need to change 2 lines in cron, and not all the Perl 
programs.


Octavian





--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Using perlbrew to change Perl version for scripts

2012-06-02 Thread Shawn H Corey

On 12-06-02 03:11 PM, Chris Nehren wrote:

On Sat, Jun 02, 2012 at 15:01:21 -0400 , Shawn H Corey wrote:

On 12-06-02 02:54 PM, sono...@fannullone.us wrote:

Chris,


Yes, the `#!/usr/bin/env perl` shebang should do. I've used it with perlbrew 
myself.


How are you getting that to work?  When I try it, it uses the
version of Perl located at /usr/bin/perl, not the version that's
selected with perlbrew.

Marc


This only works from a terminal since your .profile is run when the
terminal starts. From a CGI or cron(1) job, it runs the OS-installed
version.


Surely you can put the relevant lines into your crontab or web server
config, or use a wrapper script that sources things? This is Not Hard™.



Don't know; never tried it. It might work. Here the code from my .profile

# perlbrew
if [ -e ~/perl5/perlbrew/etc/bashrc ]
then
source ~/perl5/perlbrew/etc/bashrc
fi


Of course, if you use `perlbrew switch ...` or `perlbrew switch-off` 
then this immediately effects any cron(1) or CGI that is started after 
the switch. This is what you want if you just installed an new version 
but you can no longer use perlbrew to switch back to a previous version 
to test a script.



--
Just my 0.0002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

_Perl links_
official site   : http://www.perl.org/
beginners' help : http://learn.perl.org/faq/beginners.html
advance help: http://perlmonks.org/
documentation   : http://perldoc.perl.org/
news: http://perlsphere.net/
repository  : http://www.cpan.org/
blog: http://blogs.perl.org/
regional groups : http://www.pm.org/

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Using perlbrew to change Perl version for scripts

2012-06-02 Thread Bill Stephenson
BBEdit would work too. Just use the "Find and Replace" feature and tell it what 
directory to use. It will change that line in every file in there.

If the OP isn't using a Mac I'm sure there are other tools that do the same 
thing (I'm also pretty sure they're using a Mac)

It's not the answer they're looking for, but it's a simple and easy solution 
that's also pretty darn fast.

And you can always write a perl script that will do that same thing too ;)

Kindest Regards,

Bill Stephenson



On Jun 2, 2012, at 2:11 PM, Chris Nehren wrote:

> Surely you can put the relevant lines into your crontab or web server
> config, or use a wrapper script that sources things? This is Not Hard™.
> 
> -- 
> Chris Nehren

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Using perlbrew to change Perl version for scripts

2012-06-02 Thread Chris Nehren
On Sat, Jun 02, 2012 at 15:01:21 -0400 , Shawn H Corey wrote:
> On 12-06-02 02:54 PM, sono...@fannullone.us wrote:
> >Chris,
> >
> >>Yes, the `#!/usr/bin/env perl` shebang should do. I've used it with 
> >>perlbrew myself.
> >
> > How are you getting that to work?  When I try it, it uses the
> > version of Perl located at /usr/bin/perl, not the version that's
> > selected with perlbrew.
> >
> >Marc
> 
> This only works from a terminal since your .profile is run when the
> terminal starts. From a CGI or cron(1) job, it runs the OS-installed
> version.

Surely you can put the relevant lines into your crontab or web server
config, or use a wrapper script that sources things? This is Not Hard™.

-- 
Chris Nehren   | Coder, Sysadmin, Masochist
Shadowcat Systems Ltd. | http://shadowcat.co.uk/

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Using perlbrew to change Perl version for scripts

2012-06-02 Thread Bill Stephenson
Okay, I get it... Sorry...

Kindest Regards,

Bill Stephenson



On Jun 2, 2012, at 2:01 PM, Shawn H Corey wrote:

>>> #!/usr/bin/env perl`


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Using perlbrew to change Perl version for scripts

2012-06-02 Thread Bill Stephenson
Maybe I don't understand what you mean, but I'm using perlbrew on my Mac and 
running CGI scripts with it.

Kindest Regards,

Bill Stephenson



On Jun 2, 2012, at 1:53 PM, Shawn H Corey wrote:

> On my machine, perl is at /usr/bin/perl so it doesn't get clobbered. (And `ln 
> -s ...` won't clobber an existing file anyway.)
> 
> Also, perlbrew only works if your .profile is run. That means it doesn't work 
> for cron(1) jobs nor as a CGI.


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Using perlbrew to change Perl version for scripts

2012-06-02 Thread Shawn H Corey

On 12-06-02 02:54 PM, sono...@fannullone.us wrote:

Chris,


Yes, the `#!/usr/bin/env perl` shebang should do. I've used it with perlbrew 
myself.


How are you getting that to work?  When I try it, it uses the version 
of Perl located at /usr/bin/perl, not the version that's selected with perlbrew.

Marc


This only works from a terminal since your .profile is run when the 
terminal starts. From a CGI or cron(1) job, it runs the OS-installed 
version.



--
Just my 0.0002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

_Perl links_
official site   : http://www.perl.org/
beginners' help : http://learn.perl.org/faq/beginners.html
advance help: http://perlmonks.org/
documentation   : http://perldoc.perl.org/
news: http://perlsphere.net/
repository  : http://www.cpan.org/
blog: http://blogs.perl.org/
regional groups : http://www.pm.org/

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Using perlbrew to change Perl version for scripts

2012-06-02 Thread sono-io
Chris,

> Yes, the `#!/usr/bin/env perl` shebang should do. I've used it with perlbrew 
> myself.

How are you getting that to work?  When I try it, it uses the version 
of Perl located at /usr/bin/perl, not the version that's selected with perlbrew.

Marc
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Using perlbrew to change Perl version for scripts

2012-06-02 Thread Shawn H Corey

On 12-06-02 02:41 PM, Chris Nehren wrote:

And the disadvantage of clobbering whatever's in /usr/local/bin/perl,
defeating the point of perlbrew in the first place.

Don't do that.

Yes, the `#!/usr/bin/env perl` shebang should do. I've used it with
perlbrew myself.


On my machine, perl is at /usr/bin/perl so it doesn't get clobbered. 
(And `ln -s ...` won't clobber an existing file anyway.)


Also, perlbrew only works if your .profile is run. That means it doesn't 
work for cron(1) jobs nor as a CGI.



--
Just my 0.0002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

_Perl links_
official site   : http://www.perl.org/
beginners' help : http://learn.perl.org/faq/beginners.html
advance help: http://perlmonks.org/
documentation   : http://perldoc.perl.org/
news: http://perlsphere.net/
repository  : http://www.cpan.org/
blog: http://blogs.perl.org/
regional groups : http://www.pm.org/

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Using perlbrew to change Perl version for scripts

2012-06-02 Thread sono-io
Shawn,

> I don't know anything inside perlbrew that will help, but you could do this:

 Apparently this is a know issue with perlbrew.  I just found this page:

https://github.com/gugod/App-perlbrew/issues/70

> sudo ln -s /Users/marc/perl5/perlbrew/perls/perl-5.16.0/bin/perl 
> /usr/local/bin/perl

I've done something similar.  I created an alias (called "latest") to 
the newest version of Perl that I have installed with perlbrew.  Then I created 
a symlink to that alias, like so:

sudo ln -s /Users/marc/perl5/perlbrew/perls/latest/bin/perl 
/usr/local/bin/perl_latest

Now when I install a newer version of Perl, I give that one the alias of 
"latest", using perlbrew, and then all my scripts will be using the newer 
version of Perl.

The only problem is that this doesn't address my original want.  I'd 
still like to be able to test different versions of Perl simply by invoking the 
"perlbrew switch" command.  Hopefully the developer will address this concern.

Marc
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Using perlbrew to change Perl version for scripts

2012-06-02 Thread Chris Nehren
On Sat, Jun 02, 2012 at 12:57:22 -0400 , Shawn H Corey wrote:
> On 12-06-02 12:23 PM, sono...@fannullone.us wrote:
> > Is it possible to use a shebang line, like #!/usr/bin/env perl, so
> > that scripts will use the currently selected version of Perl with
> > perlbrew?  According to the help, it appears that perlbrew only
> > changes the version for the CLI:
> >
> >
> >COMMAND: SWITCH
> > Usage: perlbrew switch [  ]
> >
> > Switch to the given version, and makes it the default for this and all
> > future terminal sessions.
> >
> >
> > Right now, I'm hardcoding the version of Perl in my scripts, like:
> >
> >#!/Users/marc/perl5/perlbrew/perls/perl-5.16.0/bin/perl
> >
> >but it's an inconvenience to change the shebang line in all my
> >scripts just to try a different version.  It would be nice if
> >perlbrew took care of that as well.
> >
> > It seems like it should do this automatically, so maybe I don't have
> > something set up correctly, but googling hasn't helped.
> >
> >Thanks,
> >Marc
> 
> I don't know anything inside perlbrew that will help, but you could do this:
> 
> sudo ln -s /Users/marc/perl5/perlbrew/perls/perl-5.16.0/bin/perl
> /usr/local//bin/perl
> 
> Then change your shebangs to: #!/usr/local/bin/perl
> 
> This has the advantage of not having to run your profile to get the
> correct version of perl and when you upgrade, you just have to change
> the symlink to upgrade all your scripts.

And the disadvantage of clobbering whatever's in /usr/local/bin/perl,
defeating the point of perlbrew in the first place.

Don't do that.

Yes, the `#!/usr/bin/env perl` shebang should do. I've used it with
perlbrew myself.

-- 
Chris Nehren   | Coder, Sysadmin, Masochist
Shadowcat Systems Ltd. | http://shadowcat.co.uk/

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Using perlbrew to change Perl version for scripts

2012-06-02 Thread Shawn H Corey

On 12-06-02 12:23 PM, sono...@fannullone.us wrote:

Is it possible to use a shebang line, like #!/usr/bin/env perl, so that 
scripts will use the currently selected version of Perl with perlbrew?  
According to the help, it appears that perlbrew only changes the version for 
the CLI:


COMMAND: SWITCH
 Usage: perlbrew switch [  ]

 Switch to the given version, and makes it the default for this and all
 future terminal sessions.


Right now, I'm hardcoding the version of Perl in my scripts, like:

#!/Users/marc/perl5/perlbrew/perls/perl-5.16.0/bin/perl

but it's an inconvenience to change the shebang line in all my scripts just to 
try a different version.  It would be nice if perlbrew took care of that as 
well.

It seems like it should do this automatically, so maybe I don't have 
something set up correctly, but googling hasn't helped.

Thanks,
Marc


I don't know anything inside perlbrew that will help, but you could do this:

sudo ln -s /Users/marc/perl5/perlbrew/perls/perl-5.16.0/bin/perl 
/usr/local//bin/perl


Then change your shebangs to: #!/usr/local/bin/perl

This has the advantage of not having to run your profile to get the 
correct version of perl and when you upgrade, you just have to change 
the symlink to upgrade all your scripts.



--
Just my 0.0002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

_Perl links_
official site   : http://www.perl.org/
beginners' help : http://learn.perl.org/faq/beginners.html
advance help: http://perlmonks.org/
documentation   : http://perldoc.perl.org/
news: http://perlsphere.net/
repository  : http://www.cpan.org/
blog: http://blogs.perl.org/
regional groups : http://www.pm.org/

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Using perlbrew to change Perl version for scripts

2012-06-02 Thread sono-io
Is it possible to use a shebang line, like #!/usr/bin/env perl, so that 
scripts will use the currently selected version of Perl with perlbrew?  
According to the help, it appears that perlbrew only changes the version for 
the CLI:


COMMAND: SWITCH
Usage: perlbrew switch [  ]

Switch to the given version, and makes it the default for this and all
future terminal sessions.


Right now, I'm hardcoding the version of Perl in my scripts, like:

#!/Users/marc/perl5/perlbrew/perls/perl-5.16.0/bin/perl

but it's an inconvenience to change the shebang line in all my scripts just to 
try a different version.  It would be nice if perlbrew took care of that as 
well.

It seems like it should do this automatically, so maybe I don't have 
something set up correctly, but googling hasn't helped.

Thanks,
Marc
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Updating Perlbrew

2012-05-03 Thread sono-io
On May 3, 2012, at 1:39 PM, Paul Johnson wrote:

> If you run "perlbrew" or "perlbrew help" you'll see the main commands.
> The one you want is "perlbrew self-upgrade".  Just run that and it'll do
> the rest.

Thanks a million, Paul.  That did it.  It took about 2 seconds to 
upgrade - it's the searching that can take forever! =;)

Marc
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Updating Perlbrew

2012-05-03 Thread Paul Johnson
On Thu, May 03, 2012 at 01:09:04PM -0700, sono...@fannullone.us wrote:
> Does anyone know how to update Perlbrew to the latest version?  I've
> searched their site but I haven't found updating instructions (could
> be my Google fu if off today =:\ ).  Are you supposed to just

If you run "perlbrew" or "perlbrew help" you'll see the main commands.
The one you want is "perlbrew self-upgrade".  Just run that and it'll do
the rest.

-- 
Paul Johnson - p...@pjcj.net
http://www.pjcj.net

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Updating Perlbrew

2012-05-03 Thread sono-io
Does anyone know how to update Perlbrew to the latest version?  I've 
searched their site but I haven't found updating instructions (could be my 
Google fu if off today =:\ ).  Are you supposed to just overwrite the previous 
version instead of updating?

Thanks,
Marc
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/