Apache2::WebApp::Plugin::File - Plugin providing file handling methods


Apache2-WebApp-Plugin-File documentation  | view source Contained in the Apache2-WebApp-Plugin-File distribution.

Index


NAME

Top

Apache2::WebApp::Plugin::File - Plugin providing file handling methods

SYNOPSIS

Top

  my $obj = $c->plugin('File')->method( ... );     # Apache2::WebApp::Plugin::File->method()

    or

  $c->plugin('File')->method( ... );

DESCRIPTION

Top

Common methods for processing and outputting files.

PREREQUISITES

Top

This package is part of a larger distribution and was NOT intended to be used directly. In order for this plugin to work properly, the following packages must be installed:

  Apache2::WebApp
  MIME::Types
  Params::Validate

INSTALLATION

Top

From source:

  $ tar xfz Apache2-WebApp-Plugin-File-0.X.X.tar.gz
  $ perl MakeFile.PL PREFIX=~/path/to/custom/dir LIB=~/path/to/custom/lib
  $ make
  $ make test
  $ make install

Perl one liner using CPAN.pm:

  $ perl -MCPAN -e 'install Apache2::WebApp::Plugin::File'

Use of CPAN.pm in interactive mode:

  $ perl -MCPAN -e shell
  cpan> install Apache2::WebApp::Plugin::File
  cpan> quit

Just like the manual installation of Perl modules, the user may need root access during this process to insure write permission is allowed within the installation directory.

OBJECT METHODS

Top

open

Open the file in a web browser window.

  $c->plugin('File')->open( \%controller, '/path/to/file' );

download

Force the file as a web browser download.

  $c->plugin('File')->download( \%controller, '/path/to/file' );

SEE ALSO

Top

Apache2::WebApp, Apache2::WebApp::Plugin, Apache2::Request, MIME::Types

AUTHOR

Top

Marc S. Brooks, <mbrooks@cpan.org> - http://mbrooks.info

COPYRIGHT

Top


Apache2-WebApp-Plugin-File documentation  | view source Contained in the Apache2-WebApp-Plugin-File distribution.