CGI-Application

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

      ::LogDispatch - Integration with Log::Dispatch
      ::Session - Integration with CGI::Session
      ::Stream - Help stream files to the browser
      ::TT - Use Template::Toolkit as an alternative to HTML::Template
      ::ValidateRM - Integration with Data::FormValidator and HTML::FillInForm

    The following additional changes are also present in this release:

    - Enhanced tests and documentation for error_mode(). (Rob Kinyon). 
    - Clarified Plug-in documentation (Timothy Appnel)
    - Avoid some warnings when getting run mode from PATH_INFO (Emanuele Zeppieri)
    - Use query() object to get PATH_INFO, to workaround bug in IIS web server. (Mark Stosberg)
    - Documented return value of header_props()

3.31 Sun Sep 26, 2004
    - Documentation clean-ups. No code changes. 

3.30  Sun Sep 26, 2004
    - Refactored test suite to use Test::More (Gabor Szabo)
    - Removed warnings being emitted for documented API calls
    - minor code clean-up to load_tmpl() (Emanuele Zeppieri)
	- Support for passing multiple template paths to HTML::Template (Michael Peters) 
	- Added error_mode to support trapping runmodes dying (Rob Kinyon)
	- Added Plug-in related documentation. (Mark Stosberg) 
	- mode_param() updated to more easily set the run mode from $ENV{PATH_INFO} (Mark Stosberg)

3.22  Fri Feb 13, 2004
    - The nocgicarp flag introduced in 3.2 has now been removed due
      to ill importing side effects. Instead, we now simply use Carp
      instead of CGI::Carp. You must now explicitly load CGI::Carp if you want

t/default_runmode.t  view on Meta::CPAN

use strict;
use warnings;

use Test::More tests => 1;

$ENV{'CGI_APP_RETURN_ONLY'} = 1; # don't print

{
    package WithStartIssue;

    use base 'CGI::Application';

t/header_props.t  view on Meta::CPAN


BEGIN{use_ok('CGI::Application');}

$ENV{CGI_APP_RETURN_ONLY} = 1;

{
  my $app = CGI::Application->new;

  $app->header_type('none');

  my $warn = '';
  local $SIG{__WARN__} = sub {
    $warn = shift;
  };
  $app->header_props(-type => 'banana/ripe');

  like(
    $warn,
    qr/header_type set to 'none'/,
    "warn if we set header while header type is none",
  );
}

{
  my $app = CGI::Application->new;

  eval { $app->header_props(123); };

  like(
    $@,

t/lib/TestApp14.pm  view on Meta::CPAN

package TestApp14;
use base 'CGI::Application';
use warnings;
use strict;

sub setup {
    my $self = shift;
    $self->run_modes([qw/ start /]);
    $self->tmpl_path('t/lib/templates');
}

sub start {
    my $self = shift;

t/prerun.t  view on Meta::CPAN

	# Did the cgiapp_prerun work?
	is($ta_obj->param('PRERUN_RUNMODE'), 'prerun_test');

	# get_current_runmode() working?
	is($ta_obj->get_current_runmode(), 'prerun_test');
}


# Test basic prerun_mode()
{
	local($^W) = undef;  # Temporarily disable warnings

	my $ta_obj = TestApp6->new(QUERY=>CGI->new('rm=prerun_mode_test'));
	my $output = $ta_obj->run();

	# Did the run mode work?
	like($output, qr/^Content\-Type\:\ text\/html/);

	# We will be in mode 'new_prerun_mode_test' if everything is working
	like($output, qr/Hello\ World\:\ new\_prerun\_mode\_test\ OK/);

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.632 second using v1.00-cache-2.02-grep-82fe00e-cpan-1925d2aa809 )