OrePAN2
view release on metacpan or search on metacpan
lib/OrePAN2/Index.pm view on Meta::CPAN
use version;
use OrePAN2::Logger;
use Moo;
with 'OrePAN2::Role::HasLogger';
use Types::Standard qw( HashRef );
use namespace::clean;
use IO::Compress::Gzip qw( $GzipError );
use Path::Tiny ();
has index => ( is => 'ro', isa => HashRef, default => sub { +{} } );
sub load {
my ( $self, $fname ) = @_;
my $fh = do {
if ( $fname =~ /\.gz\z/ ) {
IO::Uncompress::Gunzip->new($fname)
or die "gzip failed: $GunzipError\n";
}
else {
( run in 2.553 seconds using v1.01-cache-2.11-cpan-0fb53d1c279 )