diff -Nru libtext-micromason-perl-2.22/CHANGES libtext-micromason-perl-2.23/CHANGES --- libtext-micromason-perl-2.22/CHANGES 2018-06-04 17:30:57.000000000 +0000 +++ libtext-micromason-perl-2.23/CHANGES 1970-01-01 00:00:00.000000000 +0000 @@ -1,633 +0,0 @@ -NAME - Text::MicroMason::Docs::Changes - Change History for the MicroMason - Distribution - -VERSION 2 HISTORY - Version 2.22 - 2018-06-04 - Add a newline in %args parsed output, to allow for comments in the - %args block. Thanks to Daniel J. Wright for this patch. - - Version 2.21 - 2016-09-30 - Remove Text::::MicroMason::ParseInfo. The module never left "rough - draft" status, wasn't tested or documented, and had fatal bugs. - - If you used it, please provide complete info on exactly how and what - for, and I can restore it. - - Version 2.20 - 2016-09-30 - Fix #118166 reported by GREGOA via Debian package testing. - - Attempt another workaround for t/34-compile_cache.t in MS32. - `perldoc perlport` leads me to believe this is an MS32-specific - issue. - - Version 2.19 - 2016-05-26 - Merge patches for pod errors and typos from Debian Perl Group. - - Work around issue in t/34-compile_cache.t where sleep() wasn't - effective on some CPANTS test servers. - - Version 2.18 - 2016-05-12 - Update version in Text::MicroMason::PLP to ensure PAUSE indexes it - properly. - - Fix bug in default_policy pod. - - Version 2.17 - 2016-05-12 - Expand documentation for Text::MicroMason::Filters. - - Add "default_policy =" 'override'> attribute for filter default - behavior - - Version 2.16 - 2015-06-27 - Remove garbage files from dist. - - Version 2.15 - 2015-06-27 - [rt.cpan.org #105499] Fix regression due to new error/warning format - in Perl 5.22. - - [rt.cpan.org #92771] Fix line number regressionf due to a Perl line - numbering bugfix. This passes tests but I'm not entirely convinced - it's correct. - - Version 2.14 - 2013-06-11 - [rt.cpan.org #85965] Fix POD errors in Changes.pod. - - Version 2.13 - 2011-01-13 - [rt.cpan.org #64192] Skip the Safe-related tests more often, since - newer versions of Safe.pm mark their own failing tests as TODO - instead of changing the module's behavior. - - Version 2.12 - 2010-09-07 - Skip more tests that fail due to a bug in Safe.pm. Add a prereq for - Safe.pm so CPAN testers will provide more debug info on failure. - - Version 2.11 - 2010-09-07 - [rt.cpan.org #61010] Fix spelling errors and pod example bugs. - Thanks to vshih at yahoo.com for reporting these problems. - - 2010-09-07 - Under Perl 5.13.1 and later with Safe version 2.27, skip failing - tests in t/32-safe.t. The regression tests for Safe 2.27 fail in - Perl 5.13.1 as well, in a similar way. This bug is not fixable in - any reasonable way until Safe.pm is also stable. - - 2010-07-26 - [rt.cpan.org #59081] Fix spelling and pod errors. Thanks to Ansgar - Burchardt and the Debian project for submitting this bug report - along with patches. - - Version 2.10 - 2010-06-29 - [rt.cpan.org #57797] Deprecate safe_methods parameter. - Unfortunately, Safe.pm version 2.27 patches a bug we were - inadvertantly taking advantage of to implement the safe_methods - parameter. Unless we can find a working implementation of - safe_methods that is smaller than "make everything unsafe" then we - can't continue to support safe_methods. - - Using safe_methods now issues a deprecation warning, but it should - work with older versions of Safe. I'm in no hurry to remove the - feature, but I don't want anyone to use it who isn't already using - it, until we know it can be supported in the future. - - Thanks to Niko Tyni and the Debian Perl Group for submitting this - bug report. - - 2010-04-05 - "uninitialized" warnings in templates were being generated at a line - number within MicroMason instead of a line number within the - template itself. Thanks to Mike Kelly for a patch: by concatenating - an empty string to each TOKEN within the template, the warning's - line number is shifted to inside the template where the - interpolation took place. - - Version 2.09 - 2010-03-24 - Fix test that was broken by changes in URI::Escape 1.30. Double - quotes aren't reserved characters in URIs but they were previously - encoded anyway. Test modified to use reserved single quotes instead, - for URI::Escape testing. - - Version 2.08 - 2010-03-08 - Fixed PassVariables bug: <%init> failed with -PassVariables plugin. - Thanks to William Kern for reporting this. - - 2009-11-19 - Fixed [rt.cpan.org #51727] [Patch] POD nit; thanks to Frank Wiegand - for reporting this. - - Version 2.07 - 2009-11-16 - Merge patch from Simon Cavalletto: fix bug reported in CPAN forum - with "OUT" appearing in the input template stream. Thanks! - - Update requirement for Test::More 0.48 or later in Makefile.PL. - Tests using unlike() failed with Test::More version 0.47. - - Fix problem in t/08_errors.t which caused test failures in Perl 5.6. - The error message isn't as important as the test made it out to be, - but the code didn't have a problem. - - 2009-11-12 - Remove documentation for unsupported compile(lines => ...) mode. Put - it on ToDo instead. - - Version 2.06 - 2009-11-11 - Fix bug reported in CPAN forum: substr() in LineNumbers.pm was being - used incorrectly, resulting in incorrect line numbering in some - cases. - - 2009-11-12 - #51460: Clean up the tarball and resubmit a version that doesn't - contain a stray .tgz file. - - Version 2.05 - 2009-11-10 - Modify compilation error reporting: provide line numbers when - dumping the compiled template into $@, and change the #line to match - the line numbering correctly. - - 2009-11-11 - Fix bug reported by CPAN testers on some Windows boxes: use - Cwd::abs_path for strict_root checking to avoid literal path - separators in TemplateDir.pm. - - 2009-11-11 - Add a hint about -LineNumbers in the numbered template dump when a - compilation error occurs. - - Version 2.04 - 2009-11-06 - Fixed SKIP count in t/33_filters.t to prevent test failures when - URI::Escape isn't installed. - - Version 2.03 - 2009-10-30 - Happy Halloween. - - Updated tests to use Test::More for better diagnostics via CPAN - testers. - - Tweaked t/34 with a longer sleep() since some linux hosts seemed to - be sleeping for less than a second with sleep(1). - - Version 2.02 - 2009-10-29 - Updated Changes.pod. - - Fixed SKIP count in t/33 which caused test count mismatches when - HTML::Entities wasn't installed. - - Version 2.01 - 2009-10-29 - Fix a bug with TemplatePath error messages. If a template name was - provided that didn't exist in the path, the error message generated - by read_file didn't specify which template was requested. This - version now croaks in resolve_path instead of returning undef and - letting read_file croak. - - Updated pod to reflect this change and document previously - undocumented exception strings. - - Modified undocumented exception strings for strict_root violations. - - Version 2.0 - 2008-01-02 - Fix bug with || filter patch: it was erroneously removing the last - character of the filtered token, which made it fail if there was no - space before the |. - - Bump version to 2.0 - - Version 1.993_01 - 2007-12-21 - Add LineNumbers mixin and associated tests. - - 2007-12-21 - Update TODO: move almost everything into a WISH LIST with a request - for contributions, and make the main TODO list bug fixes and a few - likely developments. - - 2007-12-21 - Merge test and patch from RT bug #21802: cache expiration bug. - - 2007-12-21 - Merge changes from RT bug #18435: filter problem with <% $thing || - "default" %> - - 2007-12-21 - Bump version to 1.993_01 - - Version 1.993 - 2007-12-20 - Merge changes from pair Networks local branch, which have been in - testing and production since Q1 2007; bump version to 1.993. - - This includes: - - TemplatePath mixin - Template lookups on a search path - - TemplateDir/ Cache patch - fix interaction of caching and TemplateDir/TemplatePath - - Additional test files - Stop creating cache objects unless/until they're used - - Version 1.992_01 - 2007-12-20 - Updated pod and makefiles for maintenance transition from Simon to - Alan. Thanks for the wonderful module, Simon! I hope I can keep - things under control. - - Bumped version number. - - Version 1.992 - 2005-11-13 - Updated ToDo.pod with a few ideas for upcoming releases. - - Extended t/58-quicktemplate.t to demonstrate use of the pre_fill - method. - - 2005-11-12 - Fixed incorrect handling of default values for array or hash - variables in an <%args> block. Thanks to Alexander for the bug - report. - - Added extra newlines to the do blocks generated by Base's - assemble(), so that <% exprs %> can contain a comment. Problem - reported by Alexander. - - Improved error reporting by changing the file name embedded in the - CPP-style line number comment at the top of each stretch of - generated Perl code. Based on a problem report from Alexander. This - does not fix the line numbering problem, but at least the file name - is more helpful than it used to be. - - 2005-08-24 - Added RoughDraft of "ParseInfo.pm" based on a reply to a question - via email from Alexander. - - 2005-07-30 - Fixed return value from Text::MicroMason::Cache::File set() method; - thanks to Alan Ferrency for the helpful bug report and test case. - - 2005-07-24 - Extracted HasParams and StoreOne mixins from HTMLTemplate. - - Added QuickTemplate mixin class with emulation for - Text::QuickTemplate. - - 2005-07-20 - Added reference links to benchmarking section in Docs/ToDo.pod. - - Added "local $^W;" in two test scripts to silence extra warning on - Perl 5.005_04. - - Bumped version number. - - Version 1.991 - 2005-07-19 - Bumped version number. - - Added ApacheHandler configuration options and basic documentation. - - 2005-07-18 - Added PLP mixin class with emulation for PLP templating package. - - Added the skeleton for a basic ApacheHandler class. - - Improved strict_root support in TemplateDir and added documentation - for it. - - Extracted argument passing logic from TextTemplate to create new - PassVariables mixin. - - Added Sprintf syntax mixin and basic tests. - - 2005-07-17 - Added DoubleQuote syntax mixin and basic tests. - - Version 1.99 - 2005-07-09 - Added AllowGlobals mixin based on suggestion and patch from Jonas - Alves. Reviewed similar functionality in HTML::Mason and added docs - and tests. - - Extracted debug options to separate Debug mixin class. - - Changed name of internal new() method to create(), while propogating - the mixin finding behavior from the Text::MicroMason facade up to - Text::MicroMason::Base. - - Renamed examples directory to samples. - - Added read_handle method and output_sub attribute. - - Added assembler_vars method and removed %Assembler global. - - 2004-12-01 - Fixed early exit of t/42-text_template.t to skip test if missing - Text::Balanced. - - 2004-11-30 - Renamed the Mason compatibilty class to HTMLMason to match other - syntax classes. Changed it to be a mixin like the other classes, - instead of a subclass. - - Switched to use of Class::MixinFactory and removed old class() and - NEXT() methods. - - Extracted new interpret() method from inside of compile(). - - Adjusted setting of options and attributes so that this doesn't - happen within interpret(). - - Extracted list of related modules to new Docs::Related POD file. - - Version 1.98 - 2004-11-29 - Fixed unprotected test dependency on Text::Balanced for TextTemplate - emulation. - - Fixed unexpected side-effect of change to parsing for - single-character Filter flags. - - Minor adjustments to POD documentation. - - Version 1.97 - 2004-11-28 - Moved to do list into new pod file. Moved extra pod files into Docs - namespace. - - Added _printable to default set of functions in Filters. Tweaked - parse_filters and get_filter_functions methods. - - Changed internal names for ouput and include token types to expr and - file. Corrected typo in one of the assembler token names. - - Adjusted $Carp::CarpLevel in Base croak_msg(). - - Fixed test failure in t/33-filters.t reported by William Kern. - - 2004-10-24 - Fixed typo in ServerPages example; thanks to William Kern for - pointing it out. - - 2004-10-20 - Adjustments to documentation in top-level package. - - Version 1.96 - 2004-10-19 - Added PostProcess mixin class at the suggestion of Alan Ferrency. - - Renamed a few keys in the hash returned by assembler_rules(). - - Moved syntax documentation to Mason subclass. - - Version 1.95 - 2004-10-19 - Fixed problem with extra semicolons breaking code statements broken - onto multiple % code lines; thanks to Alan Ferrency for test code to - isolate the problem, now added to regression tests. - - 2004-10-17 - Documentation updates. - - Version 1.94 - 2004-10-17 - Factored subclass-specific lex_token() method out from superclass - lex() method. - - Added Embperl mixin class with emulation for HTML::Embperl. - - Merged Devel.pod back in to other package documentation. - - 2004-10-16 - Replaced assembler attribute with assembler_rules() method. - - Added Mason subclass and moved some functionality to there from - Base. - - Documentation updates. - - 2004-10-15 - Added HTMLTemplate mixin class with emulation for HTML::Template. - - 2004-10-13 - Added TextTemplate mixin class with emulation for Text::Template. - - Version 1.93 - 2004-10-12 - Instead of run-time eval of @MIXIN to fix SUPER resolution, now - using a new SUPER method. - - 2004-10-11 - Documentation updates. - - Version 1.92 - 2004-10-11 - Uploaded to CPAN to fix packaging issue with 1.9_1. - - Version 1.91 - 2004-10-10 - Posted description of mixin mechanism to PerlMonks for discussion. - - Debugged CompileCache and finished ExecuteCache. Added test scripts. - - Debugged TemplateDir and added test script. - - Implemented support for one-time options passed to compile that - override other attributes. Adjusted Safe facade to prevent this from - being done there, in order to avoid escapes from a Safe compartment. - - 2004-10-09 - Reorganized t/ directory. - - Version 1.90 - 2004-10-08 - Documentation updates. - - 2004-10-05 - Documentation updates. - - Version 1.55 - 2004-09-23 - Documentation updates. - - Version 1.54 - 2004-09-22 - Renamed "interpret" method to "execute" for consistency with - function interface. - - Moved try_ functionality to new ErrorCatching mixin. - - Generalized behavior of assemble method; moved template elements - into %Assembly hash. - - Version 1.53 - 2004-09-22 - Moved Safe functionality to new Safe mixin. - - Moved filtering functionality to new Filters mixin. - - 2004-09-21 - Added mixin inheritance hacking logic based on - DBIx::SQLEngine::Record::Class. - - Version 1.52 - 2004-09-19 - Extracted Changes to separate POD document. - - 2004-09-18 - Additional work. - - Version 1.51 - 2004-09-17 - Refactoring of method interface to merge compie and interpretation - into single subroutines with parameters to indicate whether we're - reading text or a file. - - Added initial support for filtering interpolated expressions based - on a patch and extended discussion with Alan Ferrency. - - Packaged as version 1.51 but not released to CPAN. - - 2004-09-16 - Refactored to object-oriented implementation to allow subclassing. - Inspired by discussion with Alan Ferrency about how to extend - functionality. - - Started CodeCache subclass based on experimental caching code - included in 1.07. - - Started TemplateDir subclass with base directory and relative path - calculations based on a patch from Tommi Maekitalo. - - Incorporated patch from Tommi Maekitalo to put default values from - an <%args> block into the %ARGS variable as well as the separate - named variables. - - Created ServerPages subclass based on feature request from William - Kern. - - 2004-09-15 - Moved package documentation into separate ReadMe.pod. - -VERSION 1 HISTORY - Version 1.07 - 2003-09-26 - Discard line break after <%perl> block as suggested by Tommi - Maekitalo. Note that removing these line breaks may affect the - rendering of your current templates! Although I am typically - hesitant to change established behavior, this does improve the - template output and brings us into line with HTML::Mason's behavior. - - Added $Debug flag and support for <%args> blocks based on a - contribution by Tommi Maekitalo. - - Adjusted internals to allow block reordering, and added support for - <%init> and <%once>. - - Released as Text-MicroMason-1.07.tar.gz. - - Version 1.06 - 2003-09-04 - Changed the way that subroutines were scoped into the - Text::MicroMason::Commands namespace so that Safe compartments with - separate namespaces and shared symbols have the visibility that one - would expect. - - Fixed a bug in which an unadorned percent sign halted parsing, as - reported by William Kern at PixelGate. Added a test to the end of - 6-regression.t that fails under 1.05 but passes under 1.06 to - confirm this. - - Simplified parser regular expressions by using non-greedy matching. - - Added documentation for *_file() functions. Corrected documentation - to reflect the fact that template code is not compiled with "use - safe" in effect by default, but that this might change in the - future. - - Released as Text-MicroMason-1.06.tar.gz. - - Version 1.05 - 2003-08-11 - Adjusted regular expression based on parsing problems reported by - Philip King and Daniel J. Wright, related to newlines and EOF. Added - regression tests that fail under 1.04 but pass under 1.05 to ensure - these features keep working as expected. - - Added non-printing-character escaping to parser failure and - debugging messages to better track future reports of - whitespace-related bugs. - - Moved tests from test.pl into t/ subdirectory. - - Added experimental suppport for file code cache in - compile_file_codecache. - - Released as Text-MicroMason-1.05.tar.gz. - - Version 1.04 - 2002-06-23 - Adjusted regular expression based on parsing problems reported by - Mark Hampton. - - Added file-include support with <& ... &> syntax. - - Documentation tweaks. Adjusted version number to simpler 0.00 - format. Released as Text-MicroMason-1.04.tar.gz. - - 2002-01-14 - Documentation tweaks based on feedback from Pascal Barbedor. Updated - author's contact information. - - Version 1.0.3 - 2001-07-01 - Renamed from HTML::MicroMason to Text::MicroMason. Documentation - tweaks. Released as Text-MicroMason-1.0.3.tar.gz. - - Version 1.0.2 - 2001-04-10 - Munged interface for clarity. Added Safe support. Adjusted docs to - reflect feedback from mason-users. Released as - HTML-MicroMason-1.0.2.tar.gz. - - Version 1.0.1 - 2001-03-28 - Parser tweakage; additional documentation. Added Exporter support. - Released as HTML-MicroMason-1.0.1.tar.gz. - - 2001-03-26 - Added try_interpret; documented error messages. - - Version 1.0.0 - 2001-03-23 - Extended documentation; added makefile, test script. Renamed - accumulator to $OUT to match Text::Template. Released as - HTML-MicroMason-1.0.0.tar.gz. - - 2001-03-22 - Created. - -SEE ALSO - For distribution, installation, support, copyright and license - information, see Text::MicroMason::Docs::ReadMe. - diff -Nru libtext-micromason-perl-2.22/debian/changelog libtext-micromason-perl-2.23/debian/changelog --- libtext-micromason-perl-2.22/debian/changelog 2018-06-18 19:11:28.000000000 +0000 +++ libtext-micromason-perl-2.23/debian/changelog 2019-11-10 18:52:44.000000000 +0000 @@ -1,3 +1,15 @@ +libtext-micromason-perl (2.23-1) unstable; urgency=medium + + * Import upstream version 2.23. + * Update handling of documents in debian/clean and debian/rules. + * Update years of packaging copyright. + * Annotate test-only build dependencies with . + * Declare compliance with Debian Policy 4.4.1. + * Bump debhelper-compat to 12. + * debian/watch: use uscan version 4. + + -- gregor herrmann Sun, 10 Nov 2019 19:52:44 +0100 + libtext-micromason-perl (2.22-1) unstable; urgency=medium [ Salvatore Bonaccorso ] diff -Nru libtext-micromason-perl-2.22/debian/clean libtext-micromason-perl-2.23/debian/clean --- libtext-micromason-perl-2.22/debian/clean 2018-06-18 19:11:28.000000000 +0000 +++ libtext-micromason-perl-2.23/debian/clean 2019-11-10 18:52:44.000000000 +0000 @@ -1 +1,4 @@ +CHANGES +README RELATED +TODO diff -Nru libtext-micromason-perl-2.22/debian/compat libtext-micromason-perl-2.23/debian/compat --- libtext-micromason-perl-2.22/debian/compat 2018-06-18 19:11:28.000000000 +0000 +++ libtext-micromason-perl-2.23/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -10 diff -Nru libtext-micromason-perl-2.22/debian/control libtext-micromason-perl-2.23/debian/control --- libtext-micromason-perl-2.22/debian/control 2018-06-18 19:11:28.000000000 +0000 +++ libtext-micromason-perl-2.23/debian/control 2019-11-10 18:52:44.000000000 +0000 @@ -5,13 +5,13 @@ Section: perl Testsuite: autopkgtest-pkg-perl Priority: optional -Build-Depends: debhelper (>= 10) +Build-Depends: debhelper-compat (= 12) Build-Depends-Indep: perl, - libclass-mixinfactory-perl, - libhtml-parser-perl, - liburi-perl, - libtest-warn-perl -Standards-Version: 4.1.4 + libclass-mixinfactory-perl , + libhtml-parser-perl , + liburi-perl , + libtest-warn-perl +Standards-Version: 4.4.1 Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libtext-micromason-perl Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libtext-micromason-perl.git Homepage: https://metacpan.org/release/Text-MicroMason diff -Nru libtext-micromason-perl-2.22/debian/copyright libtext-micromason-perl-2.23/debian/copyright --- libtext-micromason-perl-2.22/debian/copyright 2018-06-18 19:11:28.000000000 +0000 +++ libtext-micromason-perl-2.23/debian/copyright 2019-11-10 18:52:44.000000000 +0000 @@ -11,7 +11,7 @@ Files: debian/* Copyright: 2007-2009, Christoph Berg 2009-2011, Jonathan Yu - 2009-2018, gregor herrmann + 2009-2019, gregor herrmann 2010, Ansgar Burchardt 2010, Chris Butler 2016, Lucas Kanashiro diff -Nru libtext-micromason-perl-2.22/debian/rules libtext-micromason-perl-2.23/debian/rules --- libtext-micromason-perl-2.22/debian/rules 2018-06-18 19:11:28.000000000 +0000 +++ libtext-micromason-perl-2.23/debian/rules 2019-11-10 18:52:44.000000000 +0000 @@ -9,8 +9,14 @@ override_dh_installdocs: # Convert documentation for installation pod2text $(CURDIR)/lib/Text/MicroMason/Docs/Related.pod > RELATED + pod2text $(CURDIR)/lib/Text/MicroMason/Docs/ToDo.pod > TODO + pod2text $(CURDIR)/lib/Text/MicroMason/Docs/ReadMe.pod > README dh_installdocs +override_dh_installchangelogs: + pod2text $(CURDIR)/lib/Text/MicroMason/Docs/Changes.pod > CHANGES + dh_installchangelogs + override_dh_auto_install: dh_auto_install $(RM) -v $(TMP)/usr/share/perl5/Text/MicroMason/Docs/Changes.pod diff -Nru libtext-micromason-perl-2.22/debian/watch libtext-micromason-perl-2.23/debian/watch --- libtext-micromason-perl-2.22/debian/watch 2018-06-18 19:11:28.000000000 +0000 +++ libtext-micromason-perl-2.23/debian/watch 2019-11-10 18:52:44.000000000 +0000 @@ -1,2 +1,2 @@ -version=3 +version=4 https://metacpan.org/release/Text-MicroMason .*/Text-MicroMason-([\.\d]+)\.(?:tar\.gz|tar|tgz)$ diff -Nru libtext-micromason-perl-2.22/lib/Text/MicroMason/Base.pm libtext-micromason-perl-2.23/lib/Text/MicroMason/Base.pm --- libtext-micromason-perl-2.22/lib/Text/MicroMason/Base.pm 2016-05-26 18:50:47.000000000 +0000 +++ libtext-micromason-perl-2.23/lib/Text/MicroMason/Base.pm 2019-06-27 21:23:02.000000000 +0000 @@ -68,8 +68,10 @@ my $code = $self->interpret( $src_type, $src_data ); - $self->eval_sub( $code ) - or $self->croak_msg( "MicroMason compilation failed: $@\n". _number_lines($code)."\n" ); + unless ( $self->eval_sub($code) ) { + ref($@) and die $@; + $self->croak_msg( "MicroMason compilation failed: $@\n" . _number_lines($code) . "\n" ); + } } @@ -90,9 +92,11 @@ # $result = $mason->execute( $src_type, $src_data, \%options, @arguments ); sub execute { my $self = shift; - my $sub = ( $_[0] eq 'code' ) ? do { shift; shift } : - $self->compile( shift, shift, ref($_[0]) ? %{ shift() } : () ) - or $self->croak_msg("MicroMason compilation failed: $@"); + my $sub = ( $_[0] eq 'code' ) ? do { shift; shift } : $self->compile( shift, shift, ref( $_[0] ) ? %{ shift() } : () ); + unless ($sub) { + ref($@) and die $@; + $self->croak_msg("MicroMason compilation failed: $@"); + } &$sub( @_ ); } @@ -223,7 +227,7 @@ sub_start => 'sub { ', sub_end => '}', init_errs => - 'local $SIG{__DIE__} = sub { die "MicroMason execution failed: ", @_ };', + 'local $SIG{__DIE__} = sub { ref($_[0]) and die $_[0]; die "MicroMason execution failed: ", @_ };', # Argument processing elements init_args => 'my %ARGS = @_ if ($#_ % 2);', diff -Nru libtext-micromason-perl-2.22/lib/Text/MicroMason/Docs/Changes.pod libtext-micromason-perl-2.23/lib/Text/MicroMason/Docs/Changes.pod --- libtext-micromason-perl-2.22/lib/Text/MicroMason/Docs/Changes.pod 2018-06-04 17:30:36.000000000 +0000 +++ libtext-micromason-perl-2.23/lib/Text/MicroMason/Docs/Changes.pod 2019-06-27 21:26:30.000000000 +0000 @@ -4,13 +4,24 @@ =head1 VERSION 2 HISTORY +=head2 Version 2.23 + +=over 4 + +=item 2019-06-27 + +Allow templates to throw objects without stringifying them. Thanks to +Daniel J. Wright for this patch. + +=back + =head2 Version 2.22 =over 4 =item 2018-06-04 -Add a newline in %args parsed output, to allow for comments in the %args block. +Add a newline in %args parsed output, to allow for comments in the %args block. Thanks to Daniel J. Wright for this patch. =back @@ -21,7 +32,7 @@ =item 2016-09-30 -Remove Text::::MicroMason::ParseInfo. The module never left "rough +Remove Text::MicroMason::ParseInfo. The module never left "rough draft" status, wasn't tested or documented, and had fatal bugs. If you used it, please provide complete info on exactly how and what diff -Nru libtext-micromason-perl-2.22/lib/Text/MicroMason/Docs/ReadMe.pod libtext-micromason-perl-2.23/lib/Text/MicroMason/Docs/ReadMe.pod --- libtext-micromason-perl-2.22/lib/Text/MicroMason/Docs/ReadMe.pod 2018-06-04 17:30:36.000000000 +0000 +++ libtext-micromason-perl-2.23/lib/Text/MicroMason/Docs/ReadMe.pod 2019-06-27 21:27:06.000000000 +0000 @@ -50,7 +50,7 @@ =head1 DISTRIBUTION STATUS -This is version 2.22 of Text::MicroMason. +This is version 2.23 of Text::MicroMason. If you encounter any problems, please inform the current maintainer and I'll endeavor to patch them promptly. diff -Nru libtext-micromason-perl-2.22/lib/Text/MicroMason.pm libtext-micromason-perl-2.23/lib/Text/MicroMason.pm --- libtext-micromason-perl-2.22/lib/Text/MicroMason.pm 2018-06-04 17:30:36.000000000 +0000 +++ libtext-micromason-perl-2.23/lib/Text/MicroMason.pm 2019-06-27 21:27:14.000000000 +0000 @@ -1,5 +1,5 @@ package Text::MicroMason; -$VERSION = '2.22'; +$VERSION = '2.23'; # The #line directive requires Perl 5.6 to work correctly the way we use # it in Base. @@ -558,6 +558,13 @@ unable to read the requested file, because the file path is incorrect or we have insufficient privileges to read that file. +=item * + +[Reference / Object] + +If the code inside the template throws a reference or object while calling +die(), MicroMason will re-throw the reference to the calling code. + =back diff -Nru libtext-micromason-perl-2.22/MANIFEST libtext-micromason-perl-2.23/MANIFEST --- libtext-micromason-perl-2.22/MANIFEST 2018-06-04 17:54:14.000000000 +0000 +++ libtext-micromason-perl-2.23/MANIFEST 2019-06-27 21:33:57.000000000 +0000 @@ -1,5 +1,3 @@ -Build.PL -CHANGES lib/Text/MicroMason.pm lib/Text/MicroMason/AllowGlobals.pm lib/Text/MicroMason/ApacheHandler.pm @@ -35,8 +33,7 @@ lib/Text/MicroMason/TemplatePath.pm lib/Text/MicroMason/TextTemplate.pm Makefile.PL -MANIFEST -README +MANIFEST This list of files samples/die.msn samples/hello_world.msp samples/if.tmpl @@ -89,6 +86,7 @@ t/90-cache-dir-conflict.t t/91-template_path.t t/92-template_path-cache.t -TODO +Text-MicroMason-2.23/META.json +Text-MicroMason-2.23/META.yml META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) diff -Nru libtext-micromason-perl-2.22/META.json libtext-micromason-perl-2.23/META.json --- libtext-micromason-perl-2.22/META.json 2018-06-04 17:54:14.000000000 +0000 +++ libtext-micromason-perl-2.23/META.json 2019-06-27 21:33:57.000000000 +0000 @@ -4,13 +4,13 @@ "Alan Ferrency " ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001", + "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", - "version" : "2" + "version" : 2 }, "name" : "Text-MicroMason", "no_index" : { @@ -42,5 +42,6 @@ } }, "release_status" : "stable", - "version" : "2.22" + "version" : "2.23", + "x_serialization_backend" : "JSON::PP version 2.97001" } diff -Nru libtext-micromason-perl-2.22/META.yml libtext-micromason-perl-2.23/META.yml --- libtext-micromason-perl-2.22/META.yml 2018-06-04 17:54:13.000000000 +0000 +++ libtext-micromason-perl-2.23/META.yml 2019-06-27 21:33:57.000000000 +0000 @@ -7,7 +7,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001' +generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -24,4 +24,5 @@ Safe: '0' Test::More: '0.48' perl: '5.006' -version: '2.22' +version: '2.23' +x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -Nru libtext-micromason-perl-2.22/README libtext-micromason-perl-2.23/README --- libtext-micromason-perl-2.22/README 2018-06-04 17:30:56.000000000 +0000 +++ libtext-micromason-perl-2.23/README 1970-01-01 00:00:00.000000000 +0000 @@ -1,190 +0,0 @@ -NAME - Text::MicroMason::Docs::ReadMe - About the MicroMason Distribution - -MOTIVATION - The HTML::Mason module provides a useful syntax for dynamic template - interpretation (sometimes called embedded scripting): plain text (or - HTML) containing occasional chunks of Perl code whose results are - interpolated into the text when the template is "executed." - - However, HTML::Mason also provides a full-featured web application - framework with numerous other functions, and there are times in which - I'd like to use the templating capability without configuring a full - Mason installation. - - Thus, the Text::MicroMason module was born: it supports the core aspects - of the HTML::Mason syntax ("<%...%>" expressions, "%...\n" lines and - "<%perl>..." blocks, "<& file &>" includes, "%ARGS" and - "$_out->()"), and omits the features that are web specific (like - autohandlers) or are less widely used (like "<%method>" blocks). - - You may well be thinking "yet another dynamic templating module? - Sheesh!" And you'd have a good point. There certainly are a wide variety - of templating toolkits on CPAN already. (For a brief list see - Text::MicroMason::Docs::Related.) - - Nonetheless, I think this module occupies a useful niche: it provides a - reasonable subset of HTML::Mason syntax in a very light-weight fashion. - In comparison to the other modules listed, MicroMason aims to be fairly - lightweight, using one eval per parse, converting the template to a - compiled subroutine reference, and requiring less than five hundred - lines of Perl code. - - Although it notoriously difficult to fairly benchmark competing template - frameworks, at least some anecdotal evidence indicates that this module - performs reasonably well. http://use.perl.org/~hctif/journal/25211 - http://www.gtchat.de/templateengines/templateengines_en.html - - It is also highly modular, allowing users to select and enable the - combination of features they desire. Automatic caching, safe - compartments, post-processing and other features are available as mixin - classes that are loaded on demand. - - I've recently added mixin classes that emulate the template syntax used - by Apache::ASP, Embperl, HTML::Template, PLP, Text::Template, and - Text::QuickTemplate. - -DISTRIBUTION STATUS - This is version 2.22 of Text::MicroMason. - - If you encounter any problems, please inform the current maintainer and - I'll endeavor to patch them promptly. - - This module's CPAN registration should read: - - Name DSLIP Description - -------------- ----- --------------------------------------------- - Text:: Group 11: Text Processing - ::MicroMason Rdpfp Simplified HTML::Mason Templating - - Please see the CPAN Testers report for a sample of systems this module - has been tested successfully on: - - http://testers.cpan.org/show/Text-MicroMason.html - -PREREQUISITES - The required version of perl has been increased to 5.6 as of version - 1.993_01. It should work with on any standard platform which runs Perl. - - Although almost all currently existing features work on versions of Perl - reaching back to 5.0, it will benefit Text::MicroMason in the long run - if supporting legacy versions of Perl was not necessary. Please contact - the new maintainer to gripe, if you absolutely need Text::MicroMason on - an older version of Perl. - - There is one pre-requisite module not included with the core - distribution which must be installed from CPAN: Class::MixinFactory. - - If you want to use the Text::Template compatibility mode, you will also - need to install Text::Balanced. - - Various other mixins included in MicroMason require other modules in - order to be useful, but MicroMason installs and tests without them. (I - should be more specific here in the future.) - -INSTALLATION - You should be able to install this module using the CPAN shell - interface: - - perl -MCPAN -e 'install Text::MicroMason' - - Alternately, you may retrieve this package from CPAN - ("http://search.cpan.org/~ferrency/"). - - After downloading the distribution, follow the normal procedure to - unpack and install it, using the commands shown below or their local - equivalents on your system: - - tar xzf Text-MicroMason-*.tar.gz - cd Text-MicroMason-* - perl Makefile.PL - make test && sudo make install - -SUPPORT - If you have questions or feedback about this module, please feel free to - contact the maintainer or original author at the e-mail address listed - below. Although there is no formal support program, I do attempt to - answer email promptly. - - I would be particularly interested in any suggestions towards improving - the documentation, correcting any Perl-version or platform dependencies, - as well as general feedback and suggested additions. - - Bug reports that contain a failing test case are greatly appreciated, - and suggested patches will be promptly considered for inclusion in - future releases. - - You can report bugs via the CPAN web tracking system, or send mail to - "bug-Text-MicroMason#rt.cpan.org", replacing "#" with "@". - - http://rt.cpan.org/NoAuth/Bugs.html?Dist=Text-MicroMason - -COMMUNITY - If you've found this module useful or have feedback about your - experience with it, consider sharing your opinion with other Perl users - by posting your comment to CPAN's ratings system. - - http://cpanratings.perl.org/rate/?distribution=Text-MicroMason - - For more general discussion, you may wish to post a message on the - CPAN::Forum, on PerlMonks, or on the comp.lang.perl.modules newsgroup. - These are not all monitored by the current maintainer, so if you want a - response, please contact me directly. - - http://www.cpanforum.com/dist/Text-MicroMason - http://perlmonks.org/?node=Seekers%20of%20Perl%20Wisdom - http://groups.google.com/groups?group=comp.lang.perl.modules - -THANKS - My sincere thanks to the following people for their feedback and - contributions: - - Pascal Barbedor - Mark Hampton - Philip King - Daniel J. Wright - William Kern - Tommi Maekitalo - Alan Ferrency - Jonas Alves - Alexander - Matthew Simon Cavalletto - Jon Warbrick - Frank Wiegand - Mike Kelly - Niko Tyni - Ansgar Burchardt - vshih - Debian Perl Group - Lucas Kanashiro - gregor herrmann - -SOURCE MATERIAL - Portions based on HTML::Mason by Jonathan Swartz. - - Portions based on Embperl by Gerald Richter. - - Portions based on HTML::Template by Sam Tregar. - - Portions based on PLP by Juerd Waalboer. - - Portions based on Text::Template by Mark Jason Dominus. - - Portions based on Text::QuickTemplate by Eric J. Roode. - -AUTHOR - Developed by Matthew Simon Cavalletto at Evolution Softworks. You may - contact the author directly at "evo#cpan.org" or - "simonm#cavalletto.org", replacing "#" with "@". - - Currently maintained by Alan Ferrency at pair - Networks, Inc. - -LICENSE - Copyright 2002, 2003, 2004, 2005 Matthew Simon Cavalletto. - - Portions copyright 2001 Evolution Online Systems, Inc. - - You may use, modify, and distribute this software under the same terms - as Perl. - diff -Nru libtext-micromason-perl-2.22/TODO libtext-micromason-perl-2.23/TODO --- libtext-micromason-perl-2.22/TODO 2018-06-04 17:30:57.000000000 +0000 +++ libtext-micromason-perl-2.23/TODO 1970-01-01 00:00:00.000000000 +0000 @@ -1,190 +0,0 @@ -NAME - Text::MicroMason::Docs::ToDo - Development Plans for the MicroMason - Distribution - -DESCRIPTION - This document outlines various development plans and ideas for - Text::MicroMason. - - The TO DO section describes plans which are likely to happen. - - The WISH LIST section describes a variety of ideas which are likely to - be accepted as patches, but which will most likely not be developed with - any priority any time soon. - - If you are interested in a specific feature, whether it is listed here - or not, please contact the current maintainer as described in - Text::MicroMason::Docs::ReadMe. - -TO DO - Fix all known bugs - So, please report them. - - Distribution - * Move the module files into a lib/ directory as expected in modern - CPAN distributions. - - New Mixins - * AutoLoad mixin. Using this mixin adds an AUTOLOADER to the mason - object, which interprets all unknown method calls as template names. - - New Features - * Support the previously supported but now unsupported compile(lines - => ...) source type. This was documented but non- functional, and so - the pod was removed. - -WISH LIST - Distribution - * Rewrite the MOTIVATION section of the ReadMe pod to reflect the - shift from an HTML::Mason clone to a more general templating engine - that has at least partial compatibilty with quite a few other - modules. - - Interfaces - * Test and improve the ApacheHandler interface. - - Map user-friendly Apache config directives to mixin and - initialization options. Review HTML::Mason::ApacheHandler, - HTML::Mason::Params, and HTML::Mason::Admin. - - Headers need to be constructed as per - http://modperlbook.org/html/ch06_11.html and not sent until our - first print statement; see PLP::Tie::Print. - - * Review integration with Inline::Mason. Facilitate use of mixins so - this can also do inline ServerPages and other syntaxes. - - Core Syntax - * Determine how to best stack lex_token() method so that multiple - syntax plugins can work together. - - * Extract named blocks parsing from HTMLMason to form a separate - mixin. - - * Extract variable interpolation syntax to allow it to be stacked with - other lexers. - - Syntax Emulations - * Add TemplateToolkit module with support for the basic TT syntax. The - key syntax definition is in Parser.yp, which is used to build - Template::Grammar. ("/search.cpan.org/src/ABW/Template-Toolkit- - 2.14/parser/Parser.yp" in http:) The Template::Stash dot notation - can be handled by Data::DRef. - - * Extend HTMLTemplate module with a hash mapping options that could be - passed to HTML::Template's new() into the equivalent behavior, or - croak if they're unsupported. - - * Consider extending Embperl module to support dynamic HTML tags. - - * Consider extending ServerPages module to support dynamic XML tags. - - Template Sources - * Provide a mixin to search for all files matching a given regex to - facilitate tree searches and cache pre-fetching. - - * Ensure template inclusion is always handled correctly. Possibly - provide the current template's location in %ENV. - - * Add a DHandlers mixin that supports default files. On file requests, - if file not found, look for default file. (Attribute dhandler_name - controls name of file to look for.) - - * Add an AutoHandlers mixin that supports wrapper files. On file - requests, also search hierarchy for autohandler files. (Attribute - autohandler_name controls name of file to look for.) Build a stack - of autohandlers and store it in a mason attribute. Support - ->call_next() to work through the chain. - - (I've also gotten a user request for "decorator files" which turns - out to be roughly equivalent to the AutoHandler system.) - - * Add a TemplateDB mixin which shows how to retrieve templates from a - database table. Provides a read_db() method. Accept a DBI connection - as an attribute -- or a reference to a function which will return - rows from a sql statement. - - Consider how to support caching for templates drawn from a - TemplateDB. Perhaps in addition to the source_file there can be some - kind of opaque cache key returned by the prepare method? - - Maybe cache values for db templates can be abstracted into closures - which are run to retrieve the cached value. - - Caching - * Add a DataCache mixin that provides a pre-configured cache object - for use within template code. Requires cache() method and - configuration attributes. Cache namespace should be based on source - file name or arbitrary instance for text compilation. - - Alan says: I believe this is intended for use to cache contextual - data across template runs? Is this intended to be persistent across - multiple templates (in memory/singleton), or across multiple process - invocations (in a file)? I use mod_perl, and this sounds at best not - useful and at worst, dangerous. - - * Add an InterpretCache mixin that allows caching of the parsed and - assembled Perl code for a template file, akin to Mason's var/obj/ - directory. (This would also allow visual review when debugging the - converted code.) - - * The InterpretCache and CompileCache benefit from using a cache - object that checks the keys as filenames to see if the source file - has been updated and forces cache expiration; find a way to extract - and reuse this capability from Text::MicroMason::Cache::File. - - Blessing Templates - * Add a BlessSub mixin that blesses the compiled subroutine. This - would let us add support for template-specific behaviors and - attributes. Override eval_sub() to bless sub before returning. - Attribute bless_sub controls initializer arguments passed to - BlessedSub class. BlessedSub class is base class for blessed - template objects. Provides execute() method. - - BlessedSub classes may need their own mixin factory... To avoid - having to define separate mixins for both packages, perhaps the - methods should be delegated from the coderef to the Mason instance? - (This becomes particularly attractive if each sub is automatically - getting its own cloned mason instance anyway.) - - * Add an AttrBlock mixin, using BlessedSub. Override lexer methods to - parse <%attr> blocks. Stores attribute definitions in a %once block. - Provides attr() method. - - * Add a MethodBlock mixin, using BlessedSub. Override lexer methods to - parse <%method> blocks. Stores method definitions in a %once block. - Hooks AUTOLOAD to catch method calls. - - Internals - * Consider moving output_sub to a new OutputHandle mixin which accepts - a handle as an attribute, then prints output to it rather than - returning the results as a string. - - * Clarify and document the clone-on-change behavior of prepare() and - its effects when making changes to a mason object after compiling a - template. Perhaps we should ensure that we clone every time, or at - least every time that it matters? - - Testing - * Set up a benchmarking tool to compare subclasses with other - templating solutions. Take an example from ApacheBench but execute - templates directly rather than via Apache. Store the expected output - in a text file for comparison. - - Other links to consider when benchmarking: - - http://www.chamas.com/bench/ - http://use.perl.org/~hctif/journal/25211 - http://www.gtchat.de/templateengines/templateengines_en.html - - * Set up a compliance test tool that compares the output of the - various MicroMason mixins with the other modules they emulate. This - should be able to use many of the same data files as the - benchmarking tool. - - * Add more templates to samples directory and test them. - -SEE ALSO - For distribution, installation, support, copyright and license - information, see Text::MicroMason::Docs::ReadMe. -