Echando código: Cuando Perl no puede (o no lo dejan): Perl + Bash

Que ladilla. Mi proveedor de ISP se empeña en no dejarme
Probé usando eval {} para detectar si el modulo existía, pero por alguna estupida razón Perl compilaba todo el código y me daba un error, así que me tocó hacer un parche:Can't locate Date/Manip.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.6/i686-linux /usr/lib/perl5/5.8.6
/usr/lib/perl5/site_perl/5.8.6/i686-linux /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl .) at /home/kodeg2/bin/visitor_geo_map_generator.pl
line 5.
BEGIN failed--compilation aborted at
/home/kodeg2/bin/visitor_geo_map_generator.pl line 5.
#!/bin/bashAsí que que más, no me queda otra....
export MONTH=`date +%b`
export YEAR=`date +%Y`
exec /usr/bin/perl -x $0 $*
#!/usr/bin/perl
use strict;
use LWP::UserAgent;
use constant LOG_FILE =>
"$ENV{HOME}/logs/kodegeek.com-" .
"$ENV{MONTH}" .
"-" .
"$ENV{YEAR}" .
".gz";
Buscar en Technorati: perl, bash



2 Comentarios:
You need to install Date::Manip from the CPAN. That's not a core module.
Hello Randal,
Yeah, I know, the problem is that I don have console access on my ISP to do it; Either I beg the SAs to install an RPM for me (The server uses RedHat ES3, perl-DateManip-xxx) or they install the module using CPAN (perl -MCPAN -e'install Date::Manip'.
By the way, is that you, THE Randal Schwartz???!!!
I have several of your books and it is an honor to have you on my blog.
Anyway, thanks for the visit, hopefully I will be able to ask the SAs to get me Date::Manip installed.
Regards,
-JV.
Publicar un comentario en la entrada
Enlaces a este articulo:
Crear un vínculo
<< Regresar