CGI-Application-Plugin-DevPopup-Params-1.01/ 0000755 0262545 0102025 00000000000 11307157251 017610 5 ustar angry1 pg118196 CGI-Application-Plugin-DevPopup-Params-1.01/t/ 0000755 0262545 0102025 00000000000 11307157251 020053 5 ustar angry1 pg118196 CGI-Application-Plugin-DevPopup-Params-1.01/t/t1.t 0000644 0262545 0102025 00000002506 11306167625 020574 0 ustar angry1 pg118196 #!/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\sparam | value |
!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.t 0000644 0262545 0102025 00000000677 11306167625 021225 0 ustar angry1 pg118196 #!/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.t 0000644 0262545 0102025 00000000650 11306167625 021357 0 ustar angry1 pg118196 #!/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.t 0000644 0262545 0102025 00000000450 11306167625 020567 0 ustar angry1 pg118196 #!/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.pm 0000644 0262545 0102025 00000004562 11307157220 021374 0 ustar angry1 pg118196 package 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!!,
);
}
sub _cgi_report {
my $self = shift;
my $r=0;
my $q = $self;
my $report = '';
my $param;
$report = 'param | value |
' .
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.PL 0000644 0262545 0102025 00000001070 11306167626 021566 0 ustar angry1 pg118196 # $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/CHANGES 0000644 0262545 0102025 00000000135 11307157220 020576 0 ustar angry1 pg118196 # 1.01 2009/12/07 Documentation slightly extended
# 1.00 2009/12/04 Initial revision CGI-Application-Plugin-DevPopup-Params-1.01/README 0000644 0262545 0102025 00000001365 11306167626 020503 0 ustar angry1 pg118196 NAME
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/MANIFEST 0000644 0262545 0102025 00000000236 11307157251 020742 0 ustar angry1 pg118196 CHANGES
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.yml 0000664 0262545 0102025 00000001161 11307157251 021062 0 ustar angry1 pg118196 --- #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