CGI-Application-Plugin-DevPopup-Params-1.01/0000755026254501020250000000000011307157251017610 5ustar angry1pg118196CGI-Application-Plugin-DevPopup-Params-1.01/t/0000755026254501020250000000000011307157251020053 5ustar angry1pg118196CGI-Application-Plugin-DevPopup-Params-1.01/t/t1.t0000644026254501020250000000250611306167625020574 0ustar angry1pg118196#!/usr/env perl # $Id: t1.t 13 2009-12-04 11:16:01Z stro $ use strict; use warnings; use Data::Dumper; BEGIN { $ENV{'CAP_DEVPOPUP_EXEC'} = 1; } { package My::App; use base qw/CGI::Application/; use CGI::Application::Plugin::DevPopup; use CGI::Application::Plugin::DevPopup::Params; sub setup { my $self = shift; $self->add_callback('devpopup_report', 'my_report'); $self->start_mode('runmode'); $self->run_modes([ qw/runmode/ ]); return; } sub runmode { my $self = shift; $self->param('ValueOne' => 'KeyOne'); return 'Hi there!'; } sub my_report { my $self = shift; my $outputref = shift; $self->devpopup->add_report( title => 'Test 1', report => 'Test 1 report body', ); return; } } $ENV{'CGI_APP_RETURN_ONLY'} = 1; $ENV{'HTTP_HOST'} = undef; # RT #42315 eval 'use Test::More 0.88'; if (my $msg = $@) { # Skip all tests because we need Test::More 0.88 $msg =~ s/\sat\s.*$//sx; print '1..0 # SKIP ', $msg, "\n"; } else { plan('tests' => 3); my $app = My::App->new(); my $output = $app->run(); like($output, qr/Test 1 report body/, 'Report generated'); like($output, qr!Parameters\sparamvalue!x, 'header is here'); like($output, qr!ValueOne\s\s+'KeyOne'\s!x, 'value is ok'); } CGI-Application-Plugin-DevPopup-Params-1.01/t/tpod.t0000644026254501020250000000067711306167625021225 0ustar angry1pg118196#!/usr/bin/env perl -w # $Id: tpod.t 13 2009-12-04 11:16:01Z stro $ use strict; use warnings; eval 'use Test::More'; if ($@) { eval 'use Test; plan tests => 1;'; skip('Test::More is required for testing POD',); } else { require Test::More; eval 'use Test::Pod 1.00'; plan ('skip_all' => 'Test::Pod is required for testing POD') if $@; my @poddirs = qw( blib script ); all_pod_files_ok( all_pod_files( @poddirs ) ); }CGI-Application-Plugin-DevPopup-Params-1.01/t/tpodc.t0000644026254501020250000000065011306167625021357 0ustar angry1pg118196#!/usr/bin/env perl -w # $Id: tpodc.t 8 2009-10-18 11:43:13Z stro $ use strict; use warnings; eval 'use Test::More'; if ($@) { eval 'use Test; plan tests => 1;'; skip('Test::More is required for testing POD coverage',); } else { require Test::More; eval 'use Test::Pod::Coverage 1.00'; plan ('skip_all' => 'Test::Pod::Coverage is required for testing POD coverage') if $@; all_pod_coverage_ok(); }CGI-Application-Plugin-DevPopup-Params-1.01/t/t0.t0000644026254501020250000000045011306167625020567 0ustar angry1pg118196#!/usr/env perl # $Id: t0.t 13 2009-12-04 11:16:01Z stro $ use strict; use warnings; BEGIN { use Test; plan('tests' => 1); } require CGI::Application::Plugin::DevPopup::Params; # require, no use -- import wouldn't work this way ok(1); # sanity check and other modules skipping workaround CGI-Application-Plugin-DevPopup-Params-1.01/Params.pm0000644026254501020250000000456211307157220021374 0ustar angry1pg118196package CGI::Application::Plugin::DevPopup::Params; # $Id: Params.pm 15 2009-12-07 10:52:17Z stro $ use strict; use warnings; use base qw/Exporter/; use Data::Dumper; our $VERSION = '1.01'; sub import { my $c = scalar caller; $c->add_callback( 'devpopup_report', \&_param_report ); goto &Exporter::import; } sub _param_report { my $self = shift; my $cgi = _cgi_report($self); return $self->devpopup->add_report( 'title' => 'CGIApp params', 'summary' => 'CGI::Application parameters', 'report' => qq! $cgi
Parameters
!, ); } sub _cgi_report { my $self = shift; my $r=0; my $q = $self; my $report = ''; my $param; $report = 'paramvalue' . join ($/, map { $r=1-$r; $param = Data::Dumper->Dump([$q->param($_)]); $param = substr($param, 7, length($param) - 9); qq{ $_ @{ [$param] } } } grep { not /^__CAP_DEVPOPUP/x } sort $q->param()); return $report; } 1; =head1 NAME CGI::Application::Plugin::DevPopup::Params - show CGI::Application parameters in DevPopup window =head1 SYNOPSIS use CGI::Application::Plugin::DevPopup; use CGI::Application::Plugin::DevPopup::Params; The rest of your application follows ... =head1 DESCRIPTION This module is a plugin for L. Whenever used, it creates a "Params" section in the DevPopup output. This section contains a list of CGI::Application parameters set by "param" method. Internal DevPopup parameters are omitted from output, since it's unlikely that you need them. See L for parameters description. =head1 VERSION 1.01 =head1 SEE ALSO L, L =head1 INCOMPATIBILITIES Not known. =head1 BUGS AND LIMITATIONS Not known. =head1 AUTHOR Serguei Trouchelle, L Most of code is based by CGI::Application::Plugin::DevPopup by Rhesa Rozendaal, L =head1 LICENSE AND COPYRIGHT This module is distributed under the same terms as Perl itself. Copyright (c) 2009 Serguei Trouchelle =cut CGI-Application-Plugin-DevPopup-Params-1.01/Makefile.PL0000644026254501020250000000107011306167626021566 0ustar angry1pg118196# $Id: Makefile.PL 13 2009-12-04 11:16:01Z stro $ use strict; use warnings; use ExtUtils::MakeMaker; WriteMakefile( 'DISTNAME' => 'CGI-Application-Plugin-DevPopup-Params', 'NAME' => 'CGI::Application::Plugin::DevPopup::Params', 'ABSTRACT' => 'Show CGI::Application parameters in DevPopup window', 'AUTHOR' => 'Serguei Trouchelle ', 'VERSION_FROM' => 'Params.pm', 'LICENSE' => 'perl', 'PREREQ_PM' => { 'CGI::Application::Plugin::DevPopup' => 1.03, }, ); CGI-Application-Plugin-DevPopup-Params-1.01/CHANGES0000644026254501020250000000013511307157220020576 0ustar angry1pg118196# 1.01 2009/12/07 Documentation slightly extended # 1.00 2009/12/04 Initial revision CGI-Application-Plugin-DevPopup-Params-1.01/README0000644026254501020250000000136511306167626020503 0ustar angry1pg118196NAME CGI::Application::Plugin::DevPopup::Params - show CGI::Application parameters in DevPopup window SYNOPSIS use CGI::Application::Plugin::DevPopup; use CGI::Application::Plugin::DevPopup::Params; The rest of your application follows ... VERSION 1.00 SEE ALSO CGI::Application::Plugin::DevPopup, CGI::Application INCOMPATIBILITIES Not known. BUGS AND LIMITATIONS Not known. AUTHOR Serguei Trouchelle, stro@cpan.org Most of code is based by CGI::Application::Plugin::DevPopup by Rhesa Rozendaal, rhesa@cpan.org LICENSE AND COPYRIGHT This module is distributed under the same terms as Perl itself. Copyright (c) 2009 Serguei Trouchelle CGI-Application-Plugin-DevPopup-Params-1.01/MANIFEST0000644026254501020250000000023611307157251020742 0ustar angry1pg118196CHANGES MANIFEST Makefile.PL Params.pm README t/t0.t t/t1.t t/tpod.t t/tpodc.t META.yml Module meta-data (added by MakeMaker) CGI-Application-Plugin-DevPopup-Params-1.01/META.yml0000664026254501020250000000116111307157251021062 0ustar angry1pg118196--- #YAML:1.0 name: CGI-Application-Plugin-DevPopup-Params version: 1.01 abstract: Show CGI::Application parameters in DevPopup window author: - Serguei Trouchelle license: perl distribution_type: module configure_requires: ExtUtils::MakeMaker: 0 build_requires: ExtUtils::MakeMaker: 0 requires: CGI::Application::Plugin::DevPopup: 1.03 no_index: directory: - t - inc generated_by: ExtUtils::MakeMaker version 6.55_02 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4