GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  ARCHIVE::ANY::PLUGIN (3)

.ds Aq ’

NAME

Archive::Any::Plugin - Anatomy of an Archive::Any plugin.

CONTENTS

VERSION

version 0.0944

SYNOPSIS

Explains what is required for a working plugin to Archive::Any.

PLUGINS

Archive::Any requires that your plugin define three methods, all of which are passed the absolute filename of the file. This module uses the source of Archive::Any::Plugin::Tar as an example.
<B>Subclass Archive::Any::PluginB>


 use base Archive::Any::Plugin;



<B>can_handleB> This returns an array of mime types that the plugin can handle.



 sub can_handle {
    return(
           application/x-tar,
           application/x-gtar,
           application/x-gzip,
          );
 }



<B>filesB> Return a list of items inside the archive.



 sub files {
    my( $self, $file ) = @_;
    my $t = Archive::Tar->new( $file );
    return $t->list_files;
 }



<B>extractB> This method should extract the contents of $file to the current directory. Archive::Any::Plugin handles negotiating directories for you.



 sub extract {
    my ( $self, $file ) = @_;

    my $t = Archive::Tar->new( $file );
    return $t->extract;
 }



SEE ALSO

Archive::Any

AUTHORS

o Clint Moore
o Michael G Schwern (author emeritus)
o Olaf Alders (current maintainer)

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Olaf Alders.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 ARCHIVE::ANY::PLUGIN (3) 2016-04-01

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.