Archive::Any::Plugin man page on Pidora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Pidora logo
[printable version]

Archive::Any::Plugin(3User Contributed Perl DocumentatiArchive::Any::Plugin(3)

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

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.

       Subclass Archive::Any::Plugin
	    use base 'Archive::Any::Plugin';

       can_handle
	   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',
		     );
	    }

       files
	   Return a list of items inside the archive.

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

       extract
	   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;
	    }

AUTHOR
       Clint Moore <cmoore@cpan.org>

SEE ALSO
       Archive::Any

perl v5.14.1			  2011-07-19	       Archive::Any::Plugin(3)
[top]

List of man pages available for Pidora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net