perl-Apache-EmbeddedPerl-Lite-0.06-alt1.noarch.rpm


Advertisement

Description

perl-Apache-EmbeddedPerl-Lite - light weight embedded perl parser

Distribution: ALT Linux Sisyphus
Repository: Autoimports noarch
Package name: perl-Apache-EmbeddedPerl-Lite
Package version: 0.06
Package release: alt1
Package architecture: noarch
Package type: rpm
Installed size: 10.34 KB
Download size: 10.34 KB
Official Mirror: ftp.altlinux.org
This modules is a light weight perl parser designed to be used in conjunction wit mod_perl and Apache 1 or Apache 2. It may be used as a handler for files containing embedded perl or it may be called as a subroutine to conditionally parse files of your choosing. Perl code may be embedded in a file parsed by this module as described below. Each section of perl code is collected and eval'd as a subroutine that is passed the two arguments ($classnam,$r) in its input array @_; Embedded perl should have the following format: On a line by itself: {optional whitespace} <!-- {whitespace} perl perl code here {optional whitespace} --> The beginning and terminating brackets may optionally be followed by a white space and comments, which will be ignored. i.e. <!-- perl my($class,$r) = @_; $r->print("Hello World, I am in package $class\n"); --> =item * $http_response = handler($classname,$r); The function "handler" has the prototype: _handler ($$) : method { which receives the arguments $class, $r from Apache mod_perl. input:_class name,_(a scalar, not a ref) __request handle return:_Apache response code or undef handler is not exported. Expected Codes: _ 0_OK _404_File Not Found _500_Server Error 404 could not find, open, etc... file 500 missing closing embedded perl bracket embedded perl has an error When a 500 error is returned, a warning will be issued to STDERR providing details about the error. _ A ContentType header will not be sent unless the type is specified as follows: _PerlSetVar_ContentType_text/html mod_perl configuration is as follows: PerlModule Apache::EmbeddedPerl::Lite <Files *.ebhtml> SetHandler perl-script PerlHandler Apache::EmbeddedPerl::Lite PerlSetVar ContentType text/html </Files> =item * $http_response = embedded($classname,$r,$file,@args); The function "embedded" is similar to "handler" above except that it does not send any headers. Headers are the responsibility of the application "handler", or the embedded code. @args are optional arguments that may be passed from your handler to embedded. input:_class name,_(a scalar, not a ref) __request handle, __file name __@args_[optional] appication specific return:_Apache response code or undef ... at startup or .httaccess ... use Apache::EmbeddedPerl::Lite qw(embedded); ... in the application handler ... _if ($r->filename =~ /\.ebhtml$/) { ..._ set content type, etc... _ $response = embedded(__PACKAGE__,$r,$r->filename); _} else { _ $response = embedded(__PACKAGE__,$r,$someotherfile); _} _return $response if $response; # contains error ..._ do something else

Alternatives

Requires

Provides

  • perl(Apache/EmbeddedPerl/Lite.pm) = 0.060
  • perl-Apache-EmbeddedPerl-Lite = 0.06-alt1

    Install Howto

    1. Add the following line to /etc/apt/sources.list:
      rpm [Sisyphus] http://ftp.altlinux.org/pub/distributions/ALTLinux/autoimports/Sisyphus noarch autoimports
      rpm [Sisyphus] http://ftp.altlinux.org/pub/distributions/ALTLinux/autoimports/Sisyphus noarch autoimports
      
    2. Update the package index:
      # sudo apt-get update
    3. Install perl-Apache-EmbeddedPerl-Lite rpm package:
      # sudo apt-get install perl-Apache-EmbeddedPerl-Lite

    Files

    • /usr/share/doc/perl-Apache-EmbeddedPerl-Lite-0.06/Changes
    • /usr/share/doc/perl-Apache-EmbeddedPerl-Lite-0.06/README
    • /usr/share/perl5/Apache/
    • /usr/share/perl5/Apache/EmbeddedPerl/Lite.pm
    Advertisement
    Advertisement