CGI-Application-Plugin-DevPopup-Params

 view release on metacpan or  search on metacpan

Params.pm  view on Meta::CPAN

        'summary' => 'CGI::Application parameters',
        'report'  => qq!<style type="text/css">tr.even{background-color:#eee}</style><table><thead><th colspan="2">Parameters</th></thead><tbody> $cgi </tbody></table>!,
    );
}


sub _cgi_report {
    my $self = shift;

    my $r=0;
    my $q = $self;
    my $report = '';
    my $param;

    $report = '<tr><th>param</th><th>value</th></tr>' .
        join ($/, map {
                    $r=1-$r;
                    $param = Data::Dumper->Dump([$q->param($_)]);
                    $param = substr($param, 7, length($param) - 9);
                    qq{<tr class="@{[$r?'odd':'even']}"><td valign="top"> $_ </td><td> @{ [$param] } </td></tr>}
                 } 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<CGI::Application::Plugin::DevPopup>.
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<CGI::Application/param()> for parameters description.

=head1 VERSION

1.01

=head1 SEE ALSO

L<CGI::Application::Plugin::DevPopup>, L<CGI::Application>

=head1 INCOMPATIBILITIES

Not known.

=head1 BUGS AND LIMITATIONS

Not known.

=head1 AUTHOR

Serguei Trouchelle, L<stro@cpan.org>

Most of code is based by CGI::Application::Plugin::DevPopup by Rhesa Rozendaal, L<rhesa@cpan.org>

=head1 LICENSE AND COPYRIGHT

This module is distributed under the same terms as Perl itself.

Copyright (c) 2009 Serguei Trouchelle

=cut



( run in 1.356 second using v1.01-cache-2.11-cpan-39bf76dae61 )