r76251 - in /trunk/libcgi-application-plugin-devpopup-perl: debian/ debian/components/ debian/components/p/ debian/components/q/ debian/patches/ p/ p/t/ q/ q/t/

periapt-guest at users.alioth.debian.org periapt-guest at users.alioth.debian.org
Tue Jun 21 21:49:48 UTC 2011


Author: periapt-guest
Date: Tue Jun 21 21:49:36 2011
New Revision: 76251

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=76251
Log:
fixed ftbs

Added:
    trunk/libcgi-application-plugin-devpopup-perl/debian/README.source
    trunk/libcgi-application-plugin-devpopup-perl/debian/components/
    trunk/libcgi-application-plugin-devpopup-perl/debian/components/p/
    trunk/libcgi-application-plugin-devpopup-perl/debian/components/p/test   (with props)
    trunk/libcgi-application-plugin-devpopup-perl/debian/components/q/
    trunk/libcgi-application-plugin-devpopup-perl/debian/components/q/test   (with props)
    trunk/libcgi-application-plugin-devpopup-perl/debian/patches/
    trunk/libcgi-application-plugin-devpopup-perl/debian/patches/series
    trunk/libcgi-application-plugin-devpopup-perl/debian/patches/spelling.patch
    trunk/libcgi-application-plugin-devpopup-perl/debian/update.sh   (with props)
    trunk/libcgi-application-plugin-devpopup-perl/p/
    trunk/libcgi-application-plugin-devpopup-perl/p/CHANGES
    trunk/libcgi-application-plugin-devpopup-perl/p/MANIFEST
    trunk/libcgi-application-plugin-devpopup-perl/p/META.yml
    trunk/libcgi-application-plugin-devpopup-perl/p/Makefile.PL
    trunk/libcgi-application-plugin-devpopup-perl/p/Params.pm
    trunk/libcgi-application-plugin-devpopup-perl/p/README
    trunk/libcgi-application-plugin-devpopup-perl/p/t/
    trunk/libcgi-application-plugin-devpopup-perl/p/t/t0.t
    trunk/libcgi-application-plugin-devpopup-perl/p/t/t1.t
    trunk/libcgi-application-plugin-devpopup-perl/p/t/tpod.t
    trunk/libcgi-application-plugin-devpopup-perl/p/t/tpodc.t
    trunk/libcgi-application-plugin-devpopup-perl/q/
    trunk/libcgi-application-plugin-devpopup-perl/q/CHANGES
    trunk/libcgi-application-plugin-devpopup-perl/q/MANIFEST
    trunk/libcgi-application-plugin-devpopup-perl/q/META.yml
    trunk/libcgi-application-plugin-devpopup-perl/q/Makefile.PL
    trunk/libcgi-application-plugin-devpopup-perl/q/Query.pm
    trunk/libcgi-application-plugin-devpopup-perl/q/README
    trunk/libcgi-application-plugin-devpopup-perl/q/t/
    trunk/libcgi-application-plugin-devpopup-perl/q/t/t0.t
    trunk/libcgi-application-plugin-devpopup-perl/q/t/t1.t
Removed:
    trunk/libcgi-application-plugin-devpopup-perl/debian/libcgi-application-plugin-devpopup-perl.docs
Modified:
    trunk/libcgi-application-plugin-devpopup-perl/debian/compat
    trunk/libcgi-application-plugin-devpopup-perl/debian/control
    trunk/libcgi-application-plugin-devpopup-perl/debian/copyright
    trunk/libcgi-application-plugin-devpopup-perl/debian/rules

Added: trunk/libcgi-application-plugin-devpopup-perl/debian/README.source
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/debian/README.source?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/debian/README.source (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/debian/README.source Tue Jun 21 21:49:36 2011
@@ -1,0 +1,25 @@
+For most purposes this package is a standard Debian Perl Group package.
+The aspect in which it is special is that some related modules are bundled
+together with the package. So long as you have the appropriate tar balls
+in the correct place you can build using dpkg-buildpackage or
+svn-buildpackage as you would normally.
+
+If you have a fresh checkout from the svn repository and you wish 
+to download all the tarballs to build under svn-buildpackage, then from the
+package root directory run:
+
+    ./debian/update.sh update
+
+To check for new updates drop the "update" argument. If you are building
+under dpkg-buildpackage you need to tell the script about the 
+alternative build directory so run
+
+    DESTDIR=.. ./debian/update.sh update
+
+There are a couple of important caveats about the update.sh script.
+First of all when used in update mode it will DELETE the existing tarballs.
+Secondly when you do update one of the components, the update.sh script 
+will need to be updated. These limitations arise because it is 
+a temporary work around until pkg-components (or even uscan) provides
+something more substantial.
+

Modified: trunk/libcgi-application-plugin-devpopup-perl/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/debian/compat?rev=76251&op=diff
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/debian/compat (original)
+++ trunk/libcgi-application-plugin-devpopup-perl/debian/compat Tue Jun 21 21:49:36 2011
@@ -1,1 +1,1 @@
-7
+8

Added: trunk/libcgi-application-plugin-devpopup-perl/debian/components/p/test
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/debian/components/p/test?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/debian/components/p/test (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/debian/components/p/test Tue Jun 21 21:49:36 2011
@@ -1,0 +1,33 @@
+#!/bin/sh
+
+TDIR=COMPONENTS/${DH_COMPONENT}
+export PERL5LIB=../../debian/${PACKAGE}/usr/share/perl5
+
+if [ -z ${PACKAGE} ]
+then
+    echo PACKAGE not set
+    exit 1
+fi
+
+if [ -z ${DH_COMPONENT} ]
+then
+    echo DH_COMPONENT not set
+    exit 1
+fi
+
+if [ ! -d ${TDIR} ]
+then
+    echo ${TDIR} not a directory
+    exit 1
+fi
+
+if dh_auto_test -D ${TDIR} 
+then
+    EXIT_STATUS=0
+else
+    EXIT_STATUS=1
+fi
+
+exit $EXIT_STATUS
+
+

Propchange: trunk/libcgi-application-plugin-devpopup-perl/debian/components/p/test
------------------------------------------------------------------------------
    svn:executable = *

Added: trunk/libcgi-application-plugin-devpopup-perl/debian/components/q/test
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/debian/components/q/test?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/debian/components/q/test (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/debian/components/q/test Tue Jun 21 21:49:36 2011
@@ -1,0 +1,33 @@
+#!/bin/sh
+
+TDIR=COMPONENTS/${DH_COMPONENT}
+export PERL5LIB=../../debian/${PACKAGE}/usr/share/perl5
+
+if [ -z ${PACKAGE} ]
+then
+    echo PACKAGE not set
+    exit 1
+fi
+
+if [ -z ${DH_COMPONENT} ]
+then
+    echo DH_COMPONENT not set
+    exit 1
+fi
+
+if [ ! -d ${TDIR} ]
+then
+    echo ${TDIR} not a directory
+    exit 1
+fi
+
+if dh_auto_test -D ${TDIR} 
+then
+    EXIT_STATUS=0
+else
+    EXIT_STATUS=1
+fi
+
+exit $EXIT_STATUS
+
+

Propchange: trunk/libcgi-application-plugin-devpopup-perl/debian/components/q/test
------------------------------------------------------------------------------
    svn:executable = *

Modified: trunk/libcgi-application-plugin-devpopup-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/debian/control?rev=76251&op=diff
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/debian/control (original)
+++ trunk/libcgi-application-plugin-devpopup-perl/debian/control Tue Jun 21 21:49:36 2011
@@ -1,8 +1,9 @@
 Source: libcgi-application-plugin-devpopup-perl
 Section: perl
 Priority: optional
-Build-Depends: debhelper (>= 7)
-Build-Depends-Indep: perl
+Build-Depends: debhelper (>= 8)
+Build-Depends-Indep: perl, libcgi-application-perl, libio-stringy-perl,
+ libhtml-template-perl, pkg-components (>= 0.2)
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Nicholas Bamber <nicholas at periapt.co.uk>,
  Jaldhar H. Vyas <jaldhar at debian.org>
@@ -13,7 +14,8 @@
 
 Package: libcgi-application-plugin-devpopup-perl
 Architecture: all
-Depends: ${misc:Depends}, ${perl:Depends}
+Depends: ${misc:Depends}, ${perl:Depends}, libcgi-application-perl,
+ libio-stringy-perl, libhtml-template-perl
 Breaks: libcgi-application-basic-plugin-bundle-perl (<< 0.6),
  libcgi-application-plugins-perl (<< 0.11)
 Replaces: libcgi-application-basic-plugin-bundle-perl (<< 0.6),
@@ -23,12 +25,17 @@
  displaying runtime information about your CGI::Application application in a
  popup window. Specific plugins include:
  .
- Query - Shows the state of the query object (usually a CGI)
+ CGI::Application::Plugin::DevPopup::Query - Shows the state of the query
+ object (usually a CGI)
  .
- Params - Shows the internal CGI::Application state
+ CGI::Application::Plugin::DevPopup::Params - Shows the internal
+ CGI::Application state
  .
- HTTPHeaders - Shows incoming and outgoing headers
+ CGI::Application::Plugin::DevPopup::HTTPHeaders - Shows incoming and
+ outgoing headers
  .
- Log - Shows information collected from a log file handle
+ CGI::Application::Plugin::DevPopup::Log - Shows information collected from
+ a log file handle
  .
- Timing - Shows timing information about application states.
+ CGI::Application::Plugin::DevPopup::Timing - Shows timing information about
+ application states.

Modified: trunk/libcgi-application-plugin-devpopup-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/debian/copyright?rev=76251&op=diff
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/debian/copyright (original)
+++ trunk/libcgi-application-plugin-devpopup-perl/debian/copyright Tue Jun 21 21:49:36 2011
@@ -5,6 +5,14 @@
 
 Files: *
 Copyright: 2010, Rhesa Rozendaal, <rhesa at cpan.org>
+License: Artistic or GPL-1+
+
+Files: q/*
+Copyright: 2009-2011, Serguei Trouchelle <stro at cpan.org>
+License: Artistic or GPL-1+
+
+Files: p/*
+Copyright: 2009, Serguei Trouchelle <stro at cpan.org>
 License: Artistic or GPL-1+
 
 Files: debian/*

Added: trunk/libcgi-application-plugin-devpopup-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/debian/patches/series?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/debian/patches/series (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/debian/patches/series Tue Jun 21 21:49:36 2011
@@ -1,0 +1,1 @@
+spelling.patch

Added: trunk/libcgi-application-plugin-devpopup-perl/debian/patches/spelling.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/debian/patches/spelling.patch?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/debian/patches/spelling.patch (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/debian/patches/spelling.patch Tue Jun 21 21:49:36 2011
@@ -1,0 +1,22 @@
+Author: Nicholas Bamber <nicholas at periapt.co.uk>
+Subject: Spelling
+Forwarded: no
+Last-Update: 2011-06-21
+--- a/lib/CGI/Application/Plugin/DevPopup.pm
++++ b/lib/CGI/Application/Plugin/DevPopup.pm
+@@ -266,7 +266,7 @@
+ time. This means you should place it in a BEGIN{} block, or use SetEnv or
+ PerlSetEnv (remember to set those before any PerlRequire or PerlModule lines).
+ 
+-Absense of the environment variable turns this module into a no-op: while the
++Absence of the environment variable turns this module into a no-op: while the
+ plugin and its plugins are still loaded, they won't modify your output.
+ 
+ =head1 Available Plugins
+@@ -389,4 +389,4 @@
+ This program is free software; you can redistribute it and/or modify it
+ under the same terms as Perl itself.
+ 
+-=cut
+\ No newline at end of file
++=cut

Modified: trunk/libcgi-application-plugin-devpopup-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/debian/rules?rev=76251&op=diff
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/debian/rules (original)
+++ trunk/libcgi-application-plugin-devpopup-perl/debian/rules Tue Jun 21 21:49:36 2011
@@ -1,4 +1,9 @@
 #!/usr/bin/make -f
 
 %:
-	dh $@
+	dh $@ --with components
+
+# Stop it from tryng to p/Makefile.PL and q/Makefile.PL prematurely
+override_dh_auto_configure:
+	dh_auto_configure -- DIR=
+

Added: trunk/libcgi-application-plugin-devpopup-perl/debian/update.sh
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/debian/update.sh?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/debian/update.sh (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/debian/update.sh Tue Jun 21 21:49:36 2011
@@ -1,0 +1,36 @@
+#!/bin/sh
+
+set -e
+
+DESTDIR=${DESTDIR:-../tarballs}
+MODULE=CGI-Application-Plugin-DevPopup
+PACKAGE=libcgi-application-plugin-devpopup-perl
+VERSION=1.06
+QUERY_VERS=1.03
+PARAMS_VERS=1.01
+FD=--force-download
+NS=--no-symlink
+RE=--rename
+DD="--destdir ${DESTDIR}"
+RS=--report-status
+DC=-"-watch debian/components"
+US=--upstream-version
+
+if [ $1 ]
+then
+    echo update;
+    rm -f ${DESTDIR}/${MODULE}*.tar.gz
+    uscan ${FD} ${RE} ${DD} && true;
+    uscan ${DC}/p/watch ${FD} ${NS} ${DD} ${US} ${PARAMS_VERS} && true;
+    uscan ${DC}/q/watch ${FD} ${NS} ${DD} ${US} ${QUERY_VERS} && true;
+    cd ${DESTDIR}
+    QUERY=`ls CGI-Application-Plugin-DevPpup-Query*.tar.gz`
+    mv ${QUERY} ${PACKAGE}_${VERSION}.orig-q.tar.gz
+    PARAMS=`ls CGI-Application-Plugin-DevPopup-Params*.tar.gz`
+    mv ${PARAMS} ${PACKAGE}_${VERSION}.orig-p.tar.gz
+else
+    echo report;
+    uscan ${RS} && true;
+    uscan ${DC}/p/watch ${RS} ${DD} ${US} ${PARAMS_VERS} && true;
+    uscan ${DC}/q/watch ${RS} ${DD} ${US} ${QUERY_VERS} && true;
+fi

Propchange: trunk/libcgi-application-plugin-devpopup-perl/debian/update.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: trunk/libcgi-application-plugin-devpopup-perl/p/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/p/CHANGES?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/p/CHANGES (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/p/CHANGES Tue Jun 21 21:49:36 2011
@@ -1,0 +1,2 @@
+#	1.01	2009/12/07	Documentation slightly extended
+#   1.00    2009/12/04  Initial revision  

Added: trunk/libcgi-application-plugin-devpopup-perl/p/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/p/MANIFEST?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/p/MANIFEST (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/p/MANIFEST Tue Jun 21 21:49:36 2011
@@ -1,0 +1,10 @@
+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)

Added: trunk/libcgi-application-plugin-devpopup-perl/p/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/p/META.yml?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/p/META.yml (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/p/META.yml Tue Jun 21 21:49:36 2011
@@ -1,0 +1,22 @@
+--- #YAML:1.0
+name:               CGI-Application-Plugin-DevPopup-Params
+version:            1.01
+abstract:           Show CGI::Application parameters in DevPopup window
+author:
+    - Serguei Trouchelle <stro at cpan.org>
+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

Added: trunk/libcgi-application-plugin-devpopup-perl/p/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/p/Makefile.PL?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/p/Makefile.PL (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/p/Makefile.PL Tue Jun 21 21:49:36 2011
@@ -1,0 +1,18 @@
+# $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 <stro at cpan.org>',
+  'VERSION_FROM'  => 'Params.pm',
+  'LICENSE'       => 'perl',
+  'PREREQ_PM'     => {
+                         'CGI::Application::Plugin::DevPopup' => 1.03,
+                     },
+);

Added: trunk/libcgi-application-plugin-devpopup-perl/p/Params.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/p/Params.pm?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/p/Params.pm (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/p/Params.pm Tue Jun 21 21:49:36 2011
@@ -1,0 +1,102 @@
+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!<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 at cpan.org>
+
+Most of code is based by CGI::Application::Plugin::DevPopup by Rhesa Rozendaal, L<rhesa at cpan.org>
+
+=head1 LICENSE AND COPYRIGHT
+
+This module is distributed under the same terms as Perl itself.
+
+Copyright (c) 2009 Serguei Trouchelle
+
+=cut
+

Added: trunk/libcgi-application-plugin-devpopup-perl/p/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/p/README?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/p/README (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/p/README Tue Jun 21 21:49:36 2011
@@ -1,0 +1,34 @@
+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 at cpan.org
+
+    Most of code is based by CGI::Application::Plugin::DevPopup by Rhesa
+    Rozendaal, rhesa at cpan.org
+
+LICENSE AND COPYRIGHT
+    This module is distributed under the same terms as Perl itself.
+
+    Copyright (c) 2009 Serguei Trouchelle
+

Added: trunk/libcgi-application-plugin-devpopup-perl/p/t/t0.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/p/t/t0.t?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/p/t/t0.t (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/p/t/t0.t Tue Jun 21 21:49:36 2011
@@ -1,0 +1,16 @@
+#!/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
+

Added: trunk/libcgi-application-plugin-devpopup-perl/p/t/t1.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/p/t/t1.t?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/p/t/t1.t (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/p/t/t1.t Tue Jun 21 21:49:36 2011
@@ -1,0 +1,64 @@
+#!/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 '<html><body>Hi there!</body></html>';
+	}
+
+	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</th></thead><tbody>\s<tr><th>param</th><th>value</th></tr>!x, 'header is here');
+	like($output, qr!ValueOne\s</td><td>\s+'KeyOne'\s</td></tr>!x, 'value is ok');
+}

Added: trunk/libcgi-application-plugin-devpopup-perl/p/t/tpod.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/p/t/tpod.t?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/p/t/tpod.t (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/p/t/tpod.t Tue Jun 21 21:49:36 2011
@@ -1,0 +1,18 @@
+#!/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 ) );
+}

Added: trunk/libcgi-application-plugin-devpopup-perl/p/t/tpodc.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/p/t/tpodc.t?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/p/t/tpodc.t (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/p/t/tpodc.t Tue Jun 21 21:49:36 2011
@@ -1,0 +1,17 @@
+#!/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();
+}

Added: trunk/libcgi-application-plugin-devpopup-perl/q/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/q/CHANGES?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/q/CHANGES (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/q/CHANGES Tue Jun 21 21:49:36 2011
@@ -1,0 +1,4 @@
+#   1.03    2011/06/09  Style updates, added "Current Run Mode" section per Mark Stosberg's request (RT#68724)
+#   1.02    2009/12/25  Some wording changed
+#   1.01    2009/12/07  Documentation slightly extended
+#   1.00    2009/12/04  Initial revision  

Added: trunk/libcgi-application-plugin-devpopup-perl/q/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/q/MANIFEST?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/q/MANIFEST (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/q/MANIFEST Tue Jun 21 21:49:36 2011
@@ -1,0 +1,9 @@
+CHANGES
+MANIFEST
+Makefile.PL
+Query.pm
+README
+t/t0.t
+t/t1.t
+
+META.yml                                 Module meta-data (added by MakeMaker)

Added: trunk/libcgi-application-plugin-devpopup-perl/q/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/q/META.yml?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/q/META.yml (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/q/META.yml Tue Jun 21 21:49:36 2011
@@ -1,0 +1,22 @@
+--- #YAML:1.0
+name:               CGI-Application-Plugin-DevPopup-Query
+version:            1.03
+abstract:           Show CGI query in DevPopup window
+author:
+    - Serguei Trouchelle <stro at cpan.org>
+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.56
+meta-spec:
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4

Added: trunk/libcgi-application-plugin-devpopup-perl/q/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/q/Makefile.PL?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/q/Makefile.PL (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/q/Makefile.PL Tue Jun 21 21:49:36 2011
@@ -1,0 +1,18 @@
+# $Id: Makefile.PL 14 2009-12-04 12:47:11Z stro $
+
+use strict;
+use warnings;
+
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+  'DISTNAME'      => 'CGI-Application-Plugin-DevPopup-Query',
+  'NAME'          => 'CGI::Application::Plugin::DevPopup::Query',
+  'ABSTRACT'      => 'Show CGI query in DevPopup window',
+  'AUTHOR'        => 'Serguei Trouchelle <stro at cpan.org>',
+  'VERSION_FROM'  => 'Query.pm',
+  'LICENSE'       => 'perl',
+  'PREREQ_PM'     => {
+                         'CGI::Application::Plugin::DevPopup' => 1.03,
+                     },
+);

Added: trunk/libcgi-application-plugin-devpopup-perl/q/Query.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/q/Query.pm?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/q/Query.pm (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/q/Query.pm Tue Jun 21 21:49:36 2011
@@ -1,0 +1,129 @@
+package CGI::Application::Plugin::DevPopup::Query;
+
+# $Id: Query.pm 30 2011-06-10 04:48:54Z stro $
+
+use strict;
+use warnings;
+use English qw/-no_match_vars/;
+
+use base qw/Exporter/;
+
+our $VERSION = '1.03';
+
+=head1 NAME
+
+CGI::Application::Plugin::DevPopup::Query - show CGI query in DevPopup window
+
+=head1 SYNOPSIS
+
+    use CGI::Application::Plugin::DevPopup;
+    use CGI::Application::Plugin::DevPopup::Query;
+
+    The rest of your application follows
+    ...
+
+=head1 DESCRIPTION
+
+This module is a plugin for L<CGI::Application::Plugin::DevPopup|CGI::Application::Plugin::DevPopup>.
+Whenever used, it creates two sections in the DevPopup output.
+First section, "B<Current Run Mode>", shows name of run mode executed.
+Second section, "B<CGI Query>", contains a list of CGI query parameters and
+associated values passed to your CGI::Application.
+
+See L<CGI::Application/query()> and L<CGI.pm|CGI.pm> for more information about query parameters.
+
+=head1 VERSION
+
+1.03
+
+=head1 SUBROUTINES/METHODS
+
+No public methods for this module exist.
+
+=cut
+
+sub import {
+    my $c = scalar caller;
+    $c->add_callback( 'devpopup_report', \&_runmode_report );
+    $c->add_callback( 'devpopup_report', \&_query_report );
+    goto &Exporter::import;
+}
+
+sub _runmode_report {
+    my $self = shift;
+
+    my $current_runmode = '<h3>' . ($self->get_current_runmode() || '<em>default</em>') . '</h3>';
+
+    return $self->devpopup->add_report(
+        'title'   => 'Current Run Mode',
+        'summary' => $current_runmode,
+        'report'  => $current_runmode,
+    );
+}
+
+sub _query_report {
+    my $self = shift;
+    my $cgi = _cgi_report($self);
+
+    my $current_runmode = $self->get_current_runmode() || 'default';
+
+    return $self->devpopup->add_report(
+        'title'   => 'CGI Query',
+        'summary' => 'CGI request parameters',
+        'report'  => qq!<style type="text/css">tr.even{background-color:#eee; } thead th h3 {margin: 0;}</style><table><thead><th colspan="2"><h3>CGI Query</h3></th></thead><tbody> $cgi </tbody></table>!,
+    );
+}
+
+sub _cgi_report {
+    my $self = shift;
+
+    my $r = 0;
+    my $q = $self->query;
+    my $report = '<tr><th>param</th><th>value</th></tr>' .
+            join ($INPUT_RECORD_SEPARATOR, map {
+                    $r=1-$r;
+                    qq!<tr class="@{[$r?'odd':'even']}"><td valign="top"> $_ </td><td> @{[$q->param($_)]} </td></tr>!
+                  } sort $q->param());
+    return $report;
+}
+
+1;
+
+=head1 DEPENDENCIES
+
+L<CGI::Application::Plugin::DevPopup|CGI::Application::Plugin::DevPopup>
+
+=head1 CONFIGURATION AND ENVIRONMENT
+
+N/A
+
+=head1 DIAGNOSTICS
+
+N/A
+
+=head1 SEE ALSO
+
+L<CGI::Application::Plugin::DevPopup|CGI::Application::Plugin::DevPopup>, L<CGI::Application|CGI::Application>
+
+=head1 INCOMPATIBILITIES
+
+Not known.
+
+=head1 BUGS AND LIMITATIONS
+
+Not known.
+
+=head1 AUTHOR
+
+Serguei Trouchelle, L<mailto:stro at cpan.org>
+
+Most of code is based by CGI::Application::Plugin::DevPopup by Rhesa Rozendaal, L<mailto:rhesa at cpan.org>
+
+=head1 LICENSE AND COPYRIGHT
+
+This module is distributed under the same terms as Perl itself.
+
+Copyright (c) 2009-2011 Serguei Trouchelle
+
+=cut
+

Added: trunk/libcgi-application-plugin-devpopup-perl/q/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/q/README?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/q/README (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/q/README Tue Jun 21 21:49:36 2011
@@ -1,0 +1,43 @@
+NAME
+    CGI::Application::Plugin::DevPopup::Query - show CGI query in DevPopup
+    window
+
+SYNOPSIS
+        use CGI::Application::Plugin::DevPopup;
+        use CGI::Application::Plugin::DevPopup::Query;
+
+        The rest of your application follows
+        ...
+
+DESCRIPTION
+    This module is a plugin for CGI::Application::Plugin::DevPopup. Whenever
+    used, it creates a "CGI Query" section in the DevPopup output. This
+    section contains a list of CGI query parameters passed to your
+    CGI::Application.
+
+    See "query()" in CGI::Application and CGI for more information about
+    query parameters.
+
+VERSION
+    1.01
+
+SEE ALSO
+    CGI::Application::Plugin::DevPopup, CGI::Application
+
+INCOMPATIBILITIES
+    Not known.
+
+BUGS AND LIMITATIONS
+    Not known.
+
+AUTHOR
+    Serguei Trouchelle, stro at cpan.org
+
+    Most of code is based by CGI::Application::Plugin::DevPopup by Rhesa
+    Rozendaal, rhesa at cpan.org
+
+LICENSE AND COPYRIGHT
+    This module is distributed under the same terms as Perl itself.
+
+    Copyright (c) 2009 Serguei Trouchelle
+

Added: trunk/libcgi-application-plugin-devpopup-perl/q/t/t0.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/q/t/t0.t?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/q/t/t0.t (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/q/t/t0.t Tue Jun 21 21:49:36 2011
@@ -1,0 +1,16 @@
+#!/usr/env perl
+
+# $Id: t0.t 30 2011-06-10 04:48:54Z stro $
+
+use strict;
+use warnings;
+
+BEGIN {
+    use Test;
+    plan('tests' => 1);
+}
+
+require CGI::Application::Plugin::DevPopup::Query; # require, no use -- import wouldn't work this way
+
+ok(1); # sanity check and other modules skipping workaround
+

Added: trunk/libcgi-application-plugin-devpopup-perl/q/t/t1.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-plugin-devpopup-perl/q/t/t1.t?rev=76251&op=file
==============================================================================
--- trunk/libcgi-application-plugin-devpopup-perl/q/t/t1.t (added)
+++ trunk/libcgi-application-plugin-devpopup-perl/q/t/t1.t Tue Jun 21 21:49:36 2011
@@ -1,0 +1,70 @@
+#!/usr/env perl
+
+# $Id: t1.t 30 2011-06-10 04:48:54Z stro $
+
+use strict;
+use warnings;
+
+use Data::Dumper;
+
+BEGIN { $ENV{'CAP_DEVPOPUP_EXEC'} = 1; }
+
+{
+    package My::App;
+    use base qw/CGI::Application/;
+    use CGI;
+    use CGI::Application::Plugin::DevPopup;
+    use CGI::Application::Plugin::DevPopup::Query;
+
+    sub setup
+    {
+        my $self = shift;
+        $self->add_callback('devpopup_report', 'my_report');
+        $self->start_mode('runmode');
+        $self->run_modes([ qw/runmode/ ]);
+
+        my $query = CGI->new({'dinosaur' => 'barney'});
+        $self->query($query);
+
+        return;
+    }
+
+    sub runmode
+    {
+        my $self = shift;
+        return '<html><body>Hi there!</body></html>';
+    }
+
+    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' => 5);
+
+    my $app    = My::App->new();
+    my $output = $app->run();
+
+    like($output, qr/Test 1 report body/, 'Report generated');
+    like($output, qr!Current\sRun\sMode!x, 'run mode header is here');
+    like($output, qr!<h3>runmode</h3>!x, 'runmode value is ok');
+    like($output, qr!CGI\sQuery</a>\s-\sCGI\srequest\sparameters!x, 'query header is here');
+    like($output, qr!\sdinosaur\s</td><td>\sbarney\s</td></tr>!x, 'query value is ok');
+}




More information about the Pkg-perl-cvs-commits mailing list