The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Changes for version 0.30

  • The following operators are overloaded:
    • "" -> as_string bool -> SCALAR
  • env() is obsolete and will be removed in 0.31.
  • DOCUMENTATION
    • Add "WRITING Blosxom PLUGINS" to "EXAMPLES"
  • INCOMPATIBLE CHANGES
    • Summary: env() was replaced with query()
    • Add query() method which returns your query object. You can't pass your current environment (\%ENV) to new() anymore. Namely,
      • my $header = { -type => 'text/plain' }; my $h = CGI::Header->new( $header, \%ENV );
      • become
        • use CGI; my $query = CGI->new; my $h = CGI::Header->new( $header, $query );
      • query() defaults to $CGI::Q. Functions exported by CGI.pm depends on this query object. In other words, when you choose the procedural interface of CGI.pm, the module behaves like a Singleton class.
        • $query can be omitted when you choose the procedural
        • interface of CGI.pm my $h = CGI::Header->new( $header );
    • as_string() become a shortcut for:
      • $h->query->header( $h->header )
      • and so you can't pass $eol to as_string() anymore.
    • ROADMAP
      • CGI::Header is not compatible with CGI::Simple at this time. This module will be adapted to CGI::Simple gradually. (no_cache() isn't supported by CGI.pm, for example)

Modules

Adapter for CGI::header() function