i have some consitency-errors within the perl -

  • Thread starter Thread starter sayhello
  • Start date Start date
S

sayhello

Hello dear linux-experts

i have some consitency-errors within the perl - see below

Code:

install_cpan_pre.pl

#!/usr/bin/perl

use strict;
use warnings;
use Net::FTP;

use constant HOST => 'ftp.cpan.org';
use constant DIR1 => '/pub/CPAN/authors';
use constant FILE1 => '01mailrc.txt.gz';
use constant DIR2 => '/pub/CPAN/modules';
use constant FILE2 => '02packages.details.txt.gz';
use constant FILE3 => '03modlist.data.gz';

my $ftp = Net::FTP->new(
HOST,
Debug => 0,
Passive => 1,
Timeout => 1
);

$ftp->login('anonymous');
$ftp->cwd(DIR1);
$ftp->ascii;
$ftp->get(FILE1);
$ftp->cwd(DIR2);
$ftp->get(FILE2);
$ftp->size(FILE2);
$ftp->get(FILE3);
$ftp->quit;
}
See how i go on - and what is happening

Code:

#!/usr/bin/perl

use strict;
use warnings;
use YAML;
use YAML::Dumper;
use Parse::CPAN::Authors;

my $list = '/root/01mailrc.txt.gz';

my $p = Parse::CPAN::Authors->new( $list );
my @authors = $p->authors;

my $dumper = YAML::Dumper->new;
$dumper->indent_width(1);
print $dumper->dump({dump => $p}

some bad things happen


Code:

martin@linux-70ce:~/perl> perl cpan2.pl
Failed to read /root/01mailrc.txt.gz: no permission at /usr/lib/perl5/site_perl/5.18.1/Parse/CPAN/Authors.pm line 22.
martin@linux-70ce:~/perl>
guess that i have to put the file into another path

this one here: /root/01mailrc.txt.gz:

what do you say?`

Continue reading...
 
Back
Top