CPAN-Inject
view release on metacpan or search on metacpan
directory:
- inc
- t
requires:
CPAN: 1.36
CPAN::Checksums: 1.05
File::Basename: 2.6
File::Copy: 2.02
File::Path: 1.00
File::Spec: 0.80
File::chmod: 0.30
File::stat: 1.00
Params::Util: 0.21
perl: 5.6.0
resources:
license: http://dev.perl.org/licenses/
version: 1.14
Makefile.PL view on Meta::CPAN
use inc::Module::Install 1.00;
name 'CPAN-Inject';
all_from 'lib/CPAN/Inject.pm';
requires 'File::Spec' => '0.80';
requires 'File::stat' => '1.00';
requires 'File::chmod' => '0.30';
requires 'File::Path' => '1.00';
requires 'File::Copy' => '2.02';
requires 'File::Basename' => '2.6';
requires 'Params::Util' => '0.21';
requires 'CPAN' => '1.36';
requires 'CPAN::Checksums' => '1.05';
test_requires 'Test::More' => '0.42';
test_requires 'Test::Script' => '1.02';
test_requires 'File::Remove' => ($^O eq 'MSWin32')
? '0.38' # 0.36 had lots of Win32 fixes
lib/CPAN/Inject.pm view on Meta::CPAN
and sub-classable, so that it can be reused in other situations.
=head1 METHODS
=cut
use 5.006;
use strict;
use Params::Util ();
use File::stat ();
use File::chmod ();
use File::Spec ();
use File::Path ();
use File::Copy ();
use File::Basename ();
use CPAN::Checksums ();
use vars qw{$VERSION $CHECK_OWNER};
BEGIN {
$VERSION = '1.14';
lib/CPAN/Inject.pm view on Meta::CPAN
File::Path::mkpath($to_dir);
};
if ( my $e = $@ ) {
Carp::croak("Failed to create $to_dir: $e");
}
}
# Copy the file to the directory, and ensure writable
File::Copy::copy( $from_file => $to_file )
or Carp::croak("Failed to copy $from_file to $to_file");
chmod( 0644, $to_file )
or Carp::croak("Failed to correct permissions for $to_file");
# Update the checksums file, and ensure writable
SCOPE: {
local $@;
eval {
CPAN::Checksums::updatedir($to_dir);
};
if ( my $e = $@ ) {
Carp::croak("Failed to update CHECKSUMS after insertion: $e");
}
}
chmod( 0644, File::Spec->catfile( $to_dir, 'CHECKSUMS' ) )
or Carp::croak("Failed to correct permissions for CHECKSUMS");
# Return the install_path as a convenience
$self->install_path($name);
}
=pod
=head2 remove
( run in 0.264 second using v1.01-cache-2.11-cpan-496ff517765 )