Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    Apache::SSI 2.19

    Download button

    No screenshots available
    Downloads: 450  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Ken Williams | More programs
    Perl Artistic License / FREE
    December 19th, 2008, 21:28 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Apache::SSI description

    Implement Server Side Includes in Perl

    Apache::SSI is a module to implement Server Side Includes in Perl.

    SYNOPSIS

    In httpd.conf:

     < Files *.phtml > # or whatever
     SetHandler perl-script
     PerlHandler Apache::SSI
     < /Files >


    You may wish to subclass Apache::SSI for your own extensions. If so, compile mod_perl with PERL_METHOD_HANDLERS=1 (so you can use object-oriented inheritance), and create a module like this:

     package MySSI;
     use Apache::SSI ();
     @ISA = qw(Apache::SSI);

     #embedded syntax:
     #
     sub ssi_something {
     my($self, $attr) = @_;
     my $cmd = $attr->{param};
     ...
     return $a_string;
     }
     
     Then in httpd.conf:
     
     < Files *.phtml >
     SetHandler perl-script
     PerlHandler MySSI
     < /Files >


    Apache::SSI implements the functionality of mod_include for handling server-parsed html documents. It runs under Apache's mod_perl.

    In my mind, there are two main reasons you might want to use this module: you can sub-class it to implement your own custom SSI directives, and/or you can parse the output of other mod_perl handlers, or send the SSI output through another handler (use Apache::Filter to do this).

    Each SSI directive is handled by an Apache::SSI method with the prefix "ssi_". For example, < !--#printenv-- > is handled by the ssi_printenv method. attribute=value pairs inside the SSI tags are parsed and passed to the method in a hash reference.

    'Echo' directives are handled by the ssi_echo method, which delegates lookup to methods with the prefix "echo_". For instance, < !--#echo var=DOCUMENT_NAME-- > is handled by the echo_DOCUMENT_NAME method.

    You can customize behavior by inheriting from Apache::SSI and overriding 'ssi_*' and 'echo_*' methods, or writing new ones.


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Server Side Includes | Perl SSI | Apache SSI | Apache | Perl | SSI

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM