Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • BackTrack 5 R2
  • Wine 1.4 / 1.5.5
  • Mozilla Firefox 12...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.4
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.4
  • Home > Linux > Programming > Perl Modules

    Blosxom::Header 0.03005

    Download button

    No screenshots available
    Downloads: 67  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Ryo Anazawa | More programs
    Perl Artistic License / FREE
    May 5th, 2012, 15:59 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Blosxom::Header description

    Missing interface to modify HTTP headers

    Blosxom, a weblog application, exports a global variable $header which is a reference to hash. This application passes $header CGI::header() to generate HTTP headers.

    When plugin developers modify HTTP headers, they must write as follows:

     package foo;
     $blosxom::header->{'-status'} = '304 Not Modified';


    It's obviously bad practice. Blosxom misses the interface to modify them.

    Blosxom::Header is a Perl module that allows you to modify them in an object-oriented way:

     my $h = Blosxom::Header->new($blosxom::header);
     $h->set(Status => '304 Not Modified');


    You don't need to mind whether to put a hyphen before a key, nor whether to make a key lowercased or camelized.

    SYNOPSIS

     # blosxom.cgi
     package blosxom;
     our $header = { -type => 'text/html' };

     # plugins/foo
     package foo;
     use Blosxom::Header;

     my $h = Blosxom::Header->new($blosxom::header);
     my $value = $h->get('type');
     my $bool = $h->exists('type');

     $h->set( type => 'text/plain' );
     $h->remove('type');



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    HTTP headers | Perl module | Perl | HTTP | headers



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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