Apache-CGI-Builder

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

  it instead of CGI::Builder and don't include it as a normal extension.
  The old way is still working but in some next release the new way might
  become mandatory
- Added a compile time warning for deprecated usage
- Changed the prerequisite C::B version to 1.2
- Eliminated override of 'page_content_check' method not needed anymore
  with C::B 1.2
- Some POD adjustments

Version 1.1
- Advanced method 'page_content_check' overridden with automatic set of 404
  status header unless status is already defined

Version 1.0
- First public release

lib/Apache/CGI/Builder.pm  view on Meta::CPAN


; sub import
   { undef $usage
   ; require CGI::Builder
   ; unshift @_, 'CGI::Builder'
   ; goto &CGI::Builder::import
   }

; use Class::props
        { name       => 'no_page_content_status'
        , default    => '404 Not Found'
        }

; use Object::props
        { name     => 'r'
        , default  => sub{ Apache->request }
        }

; sub PerlHandler
   { my $s = shift
   ; $s = $s->new() unless ref $s

lib/Apache/CGI/Builder.pm  view on Meta::CPAN

=head3 CBF page_suffix

The default C<page_suffix> property is set to the suffix of the requested filename (e.g. being the requested filename F</path/to/file.mhtml>, the default page_suffix will be set to '.mhtml').

B<Note>:In case you have to handle a file with a multiple suffix like 'file.tar.gz' the C<suffix> will be '.tar.gz'

=head1 CBF Overriding

=head2 CBF no_page_content_status

This extension overrides this class property by just changing the '204 No Content' (that the CBF sets when no page_content has been produced by the process), with a more consistent '404 Not Found' status. It does so because the client is requesting a...

=head1 Selfloading Perl*Handlers

The CBB that uses this module, will have a special feature: a sort of Selfloading of Perl*Handlers.

When you pass a CBB class (or an instance of the CBB) as a Perl*Handler, this module will use (as the method handler) the method called with the same name of the Perl*Handler. For example:

    PerlAnyHandler My::CBB

which normally would mean:

lib/Apache2/CGI/Builder.pm  view on Meta::CPAN


; sub import
   { undef $usage
   ; require CGI::Builder
   ; unshift @_, 'CGI::Builder'
   ; goto &CGI::Builder::import
   }

; use Class::props
        { name       => 'no_page_content_status'
        , default    => '404 Not Found'
        }

; use Object::props
        { name     => 'r'
        , default  => sub{ Apache2::RequestUtil->request }
        }

; sub PerlResponseHandler
   { my $s = shift
   ; $s = $s->new() unless ref $s



( run in 2.796 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )