Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Blosxom::Header 0.06003

    Download button

    No screenshots available
    Downloads: 128  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
    September 19th, 2012, 08:32 GMT [view history]
    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

    What's New in This Release: [ read full changelog ]

    · push_p3p_tags() is obsolete and will be removed in 0.07
    · new() become a private method, not the alias of instance() any more
    · Add EXAMPLES to POD

      


    TAGS:

    HTTP headers | Perl module | weblog application | Perl | HTTP | headers

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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