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

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

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

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 >

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

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

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: > >

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

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

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

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. > >

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

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

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

Re: [OT] converting a script to a distribution

2017-12-07 Thread Shlomi Fish
Hi Luca, On Wed, 29 Nov 2017 13:56:48 +0100 Luca Ferrari wrote: > Hi all, > This is not quite tied to Perl itself, but I'm trying to migrate a few > stand-alone scripts I've written to fully distributions, may be > uploaded to CPAN. > Now, using a tool like distzilla, or

Re: Using Pack and Unpack

2017-12-07 Thread Martin McCormick
"John W. Krahn" writes: > > $ perl -le'my $x = sprintf q/%b/, 0xff; print $x' > > > use Data::Dumper; > $Data::Dumper::Useqq = 1; > > my $txstart = pack 'h*', 'fefe5a95'; > > print Dumper $txstart; Thank you and Shlomi Fish. I don't know when one stops being a

Re: Using Pack and Unpack

2017-12-07 Thread Shlomi Fish
On Wed, 06 Dec 2017 21:53:37 -0600 "Martin McCormick" wrote: > A perl program needs to send binary data to an external device > such that 0xff looks like > > I have a line in the program as follows: > > my $txstart = pack("h*","fefe5a95"); > > Are those