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

NAME

Blosxom::Header::Adapter - Adapter for CGI::header()

SYNOPSIS

  use Blosxom::Header::Adapter;

  my %adaptee = ( -type => 'text/plain' );

  tie my %adapter => 'Blosxom::Header::Adapter' => \%adaptee;

  # field names are case-insensitive
  my $length = $adapter{'Content-Length'}; # 1234
  $adapter{'Content_length'} = 4321;

  print header( %adaptee );
  # Content-length: 4321
  # Content-Type: text/plain; charset=ISO-8859-1
  #

DESCRIPTION

Adapter for CGI::header().

METHODS

$adapter = tie %adapter, 'Blosxom::Header::Adapter', \%adaptee
$value = $adapter{ $field }
$adapter{ $field } = $value
$deleted = delete $adapter{ $field }
$bool = scalar %adapter
%adapter = ()

A shortcut for

  %adaptee = ( -type => q{} );
$bool = exists %adapter{ $field }
$norm = $adapter->normalize( $field )
$adapter->nph
$adapter->attachment
$bool = $adapter->date_header_is_fixed

DIAGONOSTICS

The Date header is fixed

You attempted to modify the Date header when any of -cookie, -nph or -expires was set.

SEE ALSO

Blosxom::Header::Iterator, Tie::Hash

AUTHOR

Ryo Anazawa (anazawa@cpan.org)

LICENSE AND COPYRIGHT

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.