Subject: | Test 01.compile-html.t fails to test new spkg.pl (which is also faulty) |
01.compile-html.t doesn't specify the path to spkg.pl. On some systems
'./' is in $PATH ahead of '/usr/local/bin' and so will call the version
in the current package. However './' is not in my $PATH so it calls the
previously installed version of spkg.pl which doesn't use the new html()
method in HTML::Seamstress.
And when the new version of spkg.pl *is* run, it produces incorrect code
because __FILE__ does not interpolate at runtime (I think :-).
The attached file has my fixes for both bugs.
PS I really like HTML::Seamstress.
Subject: | hsdiff.txt |
diff -w -c -r HTML-Seamstress-3.8/spkg.pl ../../.cpanplus/5.8.6/build/HTML-Seamstress-3.8/spkg.pl
*** HTML-Seamstress-3.8/spkg.pl Fri Jan 6 16:33:35 2006
--- ../../.cpanplus/5.8.6/build/HTML-Seamstress-3.8/spkg.pl Fri Jan 13 22:53:28 2006
***************
*** 107,113 ****
use base qw(Class::Prototyped HTML::Seamstress);
-
%s;
use base qw(%s);
use vars qw($html);
--- 107,112 ----
***************
*** 117,128 ****
#warn %s->comp_root();
#%s
!
! $html = __PACKAGE__->html(__FILE__ => 'html') ;
sub new {
# my $file = __PACKAGE__->comp_root() . '%s' ;
! my $file = $html;
-e $file or die "$file does not exist. Therefore cannot load";
--- 116,126 ----
#warn %s->comp_root();
#%s
! $html = __FILE__;
sub new {
# my $file = __PACKAGE__->comp_root() . '%s' ;
! my $file = __PACKAGE__->html($html => 'html') ;
-e $file or die "$file does not exist. Therefore cannot load";
***************
*** 162,169 ****
sub fill_template {
my $template = template;
sprintf $template,
$cmdline,
! $html_pkg, use_lib,
use_base_qw, $base_pkg, $base_pkg,
relpath_to_file
--- 160,168 ----
sub fill_template {
my $template = template;
sprintf $template,
+ $html_pkg,
$cmdline,
! use_lib,
use_base_qw, $base_pkg, $base_pkg,
relpath_to_file
diff -w -c -r HTML-Seamstress-3.8/t/01.compile-html.t ../../.cpanplus/5.8.6/build/HTML-Seamstress-3.8/t/01.compile-html.t
*** HTML-Seamstress-3.8/t/01.compile-html.t Mon Nov 21 13:32:27 2005
--- ../../.cpanplus/5.8.6/build/HTML-Seamstress-3.8/t/01.compile-html.t Fri Jan 13 22:24:41 2006
***************
*** 12,18 ****
my @html = glob 't/html/*.html';
system
! "spkg.pl --base_pkg_root=$root $_"
for @html;
ok 1;
--- 12,18 ----
my @html = glob 't/html/*.html';
system
! "./spkg.pl --base_pkg_root=$root $_"
for @html;
ok 1;