Subject: | [patch] tests failing |
Hi!
This module fails its tests.
Here is the output:
[quote]
Show quoted text
>dmake test
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0,
'blib\lib',
'blib\arch')" t/*.t
t/0.t ........... defined(%hash) is deprecated at lib/HTML/Template/
Default.pm l
ine 76.
(Maybe you should just omit the defined()?)
Global symbol "$DEBUG" requires explicit package name at lib/HTML/
Template/Defau
lt.pm line 148.
Global symbol "$DEBUG" requires explicit package name at lib/HTML/
Template/Defau
lt.pm line 155.
Compilation failed in require at t/0.t line 4.
BEGIN failed--compilation aborted at t/0.t line 4.
t/0.t ........... Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
t/1-othernew.t .. defined(%hash) is deprecated at lib/HTML/Template/
Default.pm l
ine 76.
(Maybe you should just omit the defined()?)
Global symbol "$DEBUG" requires explicit package name at lib/HTML/
Template/Defau
lt.pm line 148.
Global symbol "$DEBUG" requires explicit package name at lib/HTML/
Template/Defau
lt.pm line 155.
Compilation failed in require at t/1-othernew.t line 5.
BEGIN failed--compilation aborted at t/1-othernew.t line 5.
t/1-othernew.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
Test Summary Report
-------------------
t/0.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: No plan found in TAP output
t/1-othernew.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: No plan found in TAP output
Files=2, Tests=0, 0 wallclock secs ( 0.02 usr + 0.02 sys = 0.03 CPU)
Result: FAIL
Failed 2/2 test programs. 0/0 subtests failed.
dmake: Error code 255, while making 'test_dynamic'
Show quoted text>
[/quote]
You can eleminate one failure by removing the deprecated use of defined
(%hash). It's the following code in Default.pm:
[code]
sub tmpl {
my %a = @_;
defined %a or confess('missing argument');
# ... rest here
[/code]
Change it to:
[code]
sub tmpl {
my %a = @_;
confess('missing argument') unless %a;
# ... rest here
[/code]
That's the patch for now.
Unfortunately, I have to pass on your implementation of
LEOCHARRE::Debug. I don't know how to fix that issue with the global
variable. My approach would be to remove it completely.
Here is some additional information:
* This is perl, v5.10.1 built for MSWin32-x64-multi-thread
* OS: Win7 x64
* HTML::Template v2.9
I also wrote a Buildfile.PL for this module. Maybe you want to use it
instead of the Makefile.PL. It's attached to this ticket.
Subject: | Build.PL |
use strict;
use warnings;
use Module::Build;
my $builder = Module::Build->new(
module_name => 'HTML::Template::Default',
license => 'perl',
dist_author => 'Leo Charre <leocharre at cpan dot org>',
dist_version_from => 'lib/HTML/Template/Default.pm',
requires => {
'HTML::Template' => '1.9',
'LEOCHARRE::Debug' => 0,
'Carp' => 0,
},
create_makefile_pl => 'traditional',
create_readme => 1,
add_to_cleanup => [ 'HTML-Template-Default-*' ],
);
$builder->create_build_script();