403Webshell
Server IP : 104.21.94.62  /  Your IP : 216.73.217.32
Web Server : Apache
System : Linux semi1.us.cloudlogin.co 5.10.244-xeon-hst #1 SMP Sun Sep 14 17:09:20 UTC 2025 x86_64
User : xessglobal ( 271017)
PHP Version : 8.1.33
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : OFF |  Pkexec : ON
Directory :  /usr/share/perl5/vendor_perl/Archive/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/share/perl5/vendor_perl/Archive/Peek.pm
package Archive::Peek;
use Moose;
use Archive::Peek::Tar;
use Archive::Peek::Zip;
use MooseX::Types::Path::Class qw( File );
our $VERSION = '0.35';

has 'filename' => (
    is       => 'ro',
    isa      => File,
    required => 1,
    coerce   => 1,
);

sub BUILD {
    my $self     = shift;
    my $filename = $self->filename;
    my $basename = $filename->basename;
    if ( $basename =~ /\.zip$/i ) {
        bless $self, 'Archive::Peek::Zip';
    } elsif ( $basename =~ /(\.tar|\.tar\.gz|\.tgz|\.bz2|\.bzip2)$/i ) {
        bless $self, 'Archive::Peek::Tar';
    } else {
        confess("Failed to open $filename");
    }
}

1;

__END__

=head1 NAME

Archive::Peek - Peek into archives without extracting them

=head1 SYNOPSIS

  use Archive::Peek;
  my $peek = Archive::Peek->new( filename => 'archive.tgz' );
  my @files = $peek->files();
  my $contents = $peek->file('README.txt')
  
=head1 DESCRIPTION

This module lets you peek into archives without extracting them.
It currently supports tar files and zip files. To support Bzip2-
compressed files, you should install IO::Uncompress::Bunzip2.

=head1 METHODS

=head2 new

The constructor takes the filename of the archive to peek into:

  my $peek = Archive::Peek->new( filename => 'archive.tgz' );

=head2 files

Returns the files in the archive:

  my @files = $peek->files();

=head2 file

Returns the contents of a file in the archive:

  my $contents = $peek->file('README.txt')

=head1 AUTHOR

Leon Brocard <[email protected]>

=head1 COPYRIGHT

Copyright (C) 2008, Leon Brocard.

=head1 LICENSE

This module is free software; you can redistribute it or 
modify it under the same terms as Perl itself.

Youez - 2016 - github.com/yon3zu
LinuXploit