r41073 - in /trunk/libcgi-application-perl: Changes META.yml Makefile.PL debian/changelog debian/control debian/rules lib/CGI/Application.pm
ansgar-guest at users.alioth.debian.org
ansgar-guest at users.alioth.debian.org
Fri Jul 31 10:41:13 UTC 2009
Author: ansgar-guest
Date: Fri Jul 31 10:41:05 2009
New Revision: 41073
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=41073
Log:
* New upstream release
* Bump Standards-Version to 3.8.2 (no changes).
* Use minimal debian/rules.
Modified:
trunk/libcgi-application-perl/Changes
trunk/libcgi-application-perl/META.yml
trunk/libcgi-application-perl/Makefile.PL
trunk/libcgi-application-perl/debian/changelog
trunk/libcgi-application-perl/debian/control
trunk/libcgi-application-perl/debian/rules
trunk/libcgi-application-perl/lib/CGI/Application.pm
Modified: trunk/libcgi-application-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-perl/Changes?rev=41073&op=diff
==============================================================================
--- trunk/libcgi-application-perl/Changes (original)
+++ trunk/libcgi-application-perl/Changes Fri Jul 31 10:41:05 2009
@@ -1,4 +1,16 @@
Revision history for CGI::Application.
+
+4.31 Wed Jul 29, 2009
+
+ [FEATURES]
+ - html_tmpl_class() now allows setting an an alternate HTML::Template class
+ at a run time. This makes it easy to set the class to be
+ 'HTML::Template::Dumper' for debugging. You can then see and precisely
+ test the Perl data structure that would be sent your template, taking
+ into account the template tokens that are actually set there. (Mark Stosberg)
+
+ [DOCUMENTATION]
+ - More typo fixes (Lyle)
4.21 Sat Jan 3, 2009
Modified: trunk/libcgi-application-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-perl/META.yml?rev=41073&op=diff
==============================================================================
--- trunk/libcgi-application-perl/META.yml (original)
+++ trunk/libcgi-application-perl/META.yml Fri Jul 31 10:41:05 2009
@@ -1,10 +1,10 @@
---- #YAML:1.0
+---
name: CGI-Application
-version: 4.21
+version: 4.31
author:
- - Jesse Erlbaum <jesse at erlbaum.net>
- - Mark Stosberg <mark at summersault.com>
- - with the help of many others!
+ - 'Jesse Erlbaum <jesse at erlbaum.net>'
+ - 'Mark Stosberg <mark at summersault.com>'
+ - "with the help of many others!"
abstract: Framework for building reusable web-applications
license: perl
requires:
@@ -13,10 +13,17 @@
Class::ISA: 0
HTML::Template: 0
Test::More: 0.47
+generated_by: Module::Build version 0.32
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.2.html
+ version: 1.2
+no_index:
+ file:
provides:
CGI::Application:
file: lib/CGI/Application.pm
- version: 4.21
+ version: 4.31
CGI::Application::Mailform:
file: lib/CGI/Application/Mailform.pm
-generated_by: Module::Build version 0.2611
+resources:
+ license: ~
Modified: trunk/libcgi-application-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-perl/Makefile.PL?rev=41073&op=diff
==============================================================================
--- trunk/libcgi-application-perl/Makefile.PL (original)
+++ trunk/libcgi-application-perl/Makefile.PL Fri Jul 31 10:41:05 2009
@@ -1,17 +1,17 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.03
+# Note: this file was auto-generated by Module::Build::Compat version 0.32
use ExtUtils::MakeMaker;
WriteMakefile
(
+ 'INSTALLDIRS' => 'site',
'NAME' => 'CGI::Application',
+ 'EXE_FILES' => [],
'VERSION_FROM' => 'lib/CGI/Application.pm',
'PREREQ_PM' => {
- 'CGI' => '0',
- 'Carp' => '0',
- 'Class::ISA' => '0',
- 'HTML::Template' => '0',
- 'Test::More' => '0.47'
- },
- 'INSTALLDIRS' => 'site',
- 'PL_FILES' => {}
+ 'Test::More' => '0.47',
+ 'HTML::Template' => 0,
+ 'Class::ISA' => 0,
+ 'CGI' => 0,
+ 'Carp' => 0
+ }
)
;
Modified: trunk/libcgi-application-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-perl/debian/changelog?rev=41073&op=diff
==============================================================================
--- trunk/libcgi-application-perl/debian/changelog (original)
+++ trunk/libcgi-application-perl/debian/changelog Fri Jul 31 10:41:05 2009
@@ -1,3 +1,11 @@
+libcgi-application-perl (4.31-1) UNRELEASED; urgency=low
+
+ * New upstream release
+ * Bump Standards-Version to 3.8.2 (no changes).
+ * Use minimal debian/rules.
+
+ -- Ansgar Burchardt <ansgar at 43-1.org> Fri, 31 Jul 2009 12:34:45 +0200
+
libcgi-application-perl (4.21-1) unstable; urgency=low
[ gregor herrmann ]
Modified: trunk/libcgi-application-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-perl/debian/control?rev=41073&op=diff
==============================================================================
--- trunk/libcgi-application-perl/debian/control (original)
+++ trunk/libcgi-application-perl/debian/control Fri Jul 31 10:41:05 2009
@@ -7,7 +7,7 @@
Ansgar Burchardt <ansgar at 43-1.org>
Build-Depends: debhelper (>= 7)
Build-Depends-Indep: perl (>= 5.8.0-7), libhtml-template-perl
-Standards-Version: 3.8.0
+Standards-Version: 3.8.2
Homepage: http://search.cpan.org/dist/CGI-Application/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libcgi-application-perl/
Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libcgi-application-perl/
Modified: trunk/libcgi-application-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-perl/debian/rules?rev=41073&op=diff
==============================================================================
--- trunk/libcgi-application-perl/debian/rules (original)
+++ trunk/libcgi-application-perl/debian/rules Fri Jul 31 10:41:05 2009
@@ -1,23 +1,3 @@
#!/usr/bin/make -f
-
-build: build-stamp
-build-stamp:
- dh build
- touch $@
-
-clean:
+%:
dh $@
-
-install: install-stamp
-install-stamp: build-stamp
- dh install
- touch $@
-
-binary-arch:
-
-binary-indep: install
- dh $@
-
-binary: binary-arch binary-indep
-
-.PHONY: binary binary-arch binary-indep install clean build
Modified: trunk/libcgi-application-perl/lib/CGI/Application.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-application-perl/lib/CGI/Application.pm?rev=41073&op=diff
==============================================================================
--- trunk/libcgi-application-perl/lib/CGI/Application.pm (original)
+++ trunk/libcgi-application-perl/lib/CGI/Application.pm Fri Jul 31 10:41:05 2009
@@ -3,7 +3,7 @@
use strict;
use Class::ISA;
-$CGI::Application::VERSION = '4.21';
+$CGI::Application::VERSION = '4.31';
my %INSTALLED_CALLBACKS = (
# hook name package sub
@@ -21,6 +21,7 @@
sub new {
my $class = shift;
+
my @args = @_;
if (ref($class)) {
@@ -1221,7 +1222,7 @@
Note that if you want to pass extra arguments but use the default template
name, you still need to provide a name of C<undef>:
- my $tmpl_obj = $webapp->load_tmpl(undef',
+ my $tmpl_obj = $webapp->load_tmpl(undef,
die_on_bad_params => 0,
cache => 1
);
@@ -1242,9 +1243,12 @@
B<specifying the template class with html_tmpl_class()>
-You may specify an API-compatible alternative to HTML::Template by overriding
-C<html_tmpl_class()>. This method should return the class name of your template
-system. The default simply returns "HTML::Template". The alternate class should
+You may specify an API-compatible alternative to L<HTML::Template> by setting
+a new C<html_tmpl_class()>:
+
+ $self->html_tmpl_class('HTML::Template::Dumper');
+
+The default is "HTML::Template". The alternate class should
provide at least the following parts of the HTML::Template API:
$t = $class->new( scalarref => ... ); # If you use scalarref templates
@@ -1252,9 +1256,23 @@
$t = $class->new( filename => ... );
$t->param(...);
-Example implementation:
-
- sub html_tmpl_class { 'HTML::Template::Pro' }
+Here's an example case allowing you to precisely test what's sent to your
+templates:
+
+ $ENV{CGI_APP_RETURN_ONLY} = 1;
+ my $webapp = WebApp->new;
+ $webapp->html_tmpl_class('HTML::Template::Dumper');
+ my $out_str = $webapp->run;
+ my $tmpl_href = eval "$out_str";
+
+ # Now Precisely test what would be set to the template
+ is ($tmpl_href->{pet_name}, 'Daisy', "Daisy is sent template");
+
+This is a powerful technique because HTML::Template::Dumper loads and considers
+the template file that would actually be used. If the 'pet_name' token was missing
+in the template, the above test would fail. So, you are testing both your code
+and your templates in a much more precise way than using simple regular
+expressions to see if the string "Daisy" appeared somewhere on the page.
B<The load_tmpl() callback>
@@ -1640,7 +1658,19 @@
=cut
-sub html_tmpl_class { 'HTML::Template' }
+sub html_tmpl_class {
+ my $self = shift;
+ my $tmpl_class = shift;
+
+ # First use? Create new __ERROR_MODE
+ $self->{__HTML_TMPL_CLASS} = 'HTML::Template' unless (exists($self->{__HTML_TMPL_CLASS}));
+
+ if (defined $tmpl_class) {
+ $self->{__HTML_TMPL_CLASS} = $tmpl_class;
+ }
+
+ return $self->{__HTML_TMPL_CLASS};
+}
sub load_tmpl {
my $self = shift;
@@ -1940,7 +1970,7 @@
=item *
-L<CGI::Application::Plugin::DBH> - Provides easy management of one or more database handles and candelay making the database connection until the moment it is actually used.
+L<CGI::Application::Plugin::DBH> - Provides easy management of one or more database handles and can delay making the database connection until the moment it is actually used.
=item *
More information about the Pkg-perl-cvs-commits
mailing list