Skip Menu |

This queue is for tickets about the HTML-Seamstress CPAN distribution.

Report information
The Basics
Id: 17046
Status: resolved
Worked: 2.3 hours (140 min)
Priority: 0/
Queue: HTML-Seamstress

People
Owner: metaperl [...] gmail.com
Requestors: gary [...] ashton-jones.com.au
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 3.8
Fixed in: (no value)



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;
On Fri Jan 13 07:26:22 2006, guest wrote: Show quoted text
> 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.
oh, good point. I had no idea that anyone was using HTML::Seamstress besides me :) ... please join the sourceforge mailing list: http://sourceforge.net/mail/?group_id=148707 the old way of doing things was more general and flexible and did not assume the .pm was in the same directory as .html... I am hoping to upgrade spkg.pl so that it supports both styles of .pm file generation... by the way the .pm file that works on a .html file is now called a LOOM - (L)ibrary of (O)bject-(O)riented (M)ethods for HTML. Show quoted text
> > 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.
Wow, thank you very much. Would you like to join the sourceforge project as a committer? And do you use IRC? I am EFNet #perlhelp all the time... I am also on irc.perl.org #catalyst quite a bit. http://seamstress.sourceforge.net/ is the Seamstress jump-off point. And are you using Seamstress in a web application framework? The Quickstart guide I just added to Seamstress explains that new html() method. I am doing a whole lot of stuff as I rework the Catalyst examples in Seamstress... these days I am manually making my .pm files until I can come up with a good way to bring spkg.pl up to speed.
Subject: Re: [rt.cpan.org #17046] Test 01.compile-html.t fails...
Date: Sat, 14 Jan 2006 09:58:19 +1100
To: bug-HTML-Seamstress [...] rt.cpan.org
From: Gary Ashton-Jones <gary [...] ashton-jones.com.au>
On 14/01/2006, at 4:16 AM, via RT wrote: Show quoted text
> by the way the .pm file that works on a .html file is now > called a LOOM - (L)ibrary of (O)bject-(O)riented (M)ethods for HTML.
:-) Show quoted text
> Would you like to join the sourceforge project > as a committer?
Sure, why not. If it's just you and me using it (:-) the extra eyes and hands will probably be useful. Show quoted text
> And do you use IRC? I am EFNet #perlhelp all the time... > I am also on irc.perl.org #catalyst quite a bit. >
I don't use (or like) IRC. Sorry. My brain works too slowly. Show quoted text
> http://seamstress.sourceforge.net/ is the Seamstress jump-off point.
Just had a look and subscribed to mail list. Show quoted text
> > And are you using Seamstress in a web application framework?
I'm not sure :-). I'm redeveloping a website for a choir I sing with and using this as an excuse to put my limited knowledge of Catalyst to practical use. I've developed commercial products in Mason and CGI::Application/HTML::Template and started using TT but all of them require me to switch brain spaces too much (that slow brain thing again). I've been using XML DOM's and Javascript DOM's for a long time so Seamstress and Tree just seemed to fit in. I'm at the stage of building a skeleton and putting up a few pages with some dynamic content. If things pan out as well as the preliminary stuff I've done seems to indicate, yes, I will use the Cat::Seamstress plugin. (I've committed to a working site by 30th Jan just to give me some motivation.) Show quoted text
> > The Quickstart guide I just added to Seamstress explains that new > html() > method. >
Very useful stuff for beginners. You cover most of this in the references you give in H::S pod but it's good to have it in one place. Show quoted text
> I am doing a whole lot of stuff as I rework the Catalyst examples in > Seamstress... >
I'm really interested in Cat stuff and have been doing exactly the same. Show quoted text
> these days I am manually making my .pm files until I can come up with a > good way to bring spkg.pl up to speed. >
What plans do you have for spkg? Anyway thanks again for Seamstress and I hope I can contribute a bit. Cheers Gary
CC: seamstress-discuss [...] lists.sf.net
Subject: Re: [rt.cpan.org #17046] Test 01.compile-html.t fails...
Date: Fri, 13 Jan 2006 15:31:42 -0800
To: bug-HTML-Seamstress [...] rt.cpan.org
From: Terrence Brannon <metaperl [...] gmail.com>
On 1/13/06, gary@ashton-jones.com.au via RT <bug-HTML-Seamstress@rt.cpan.org> wrote: Show quoted text
> > Would you like to join the sourceforge project > > as a committer?
> Sure, why not. If it's just you and me using it (:-) the extra eyes and > hands will probably be useful.
Ok, just give me your Sourceforge ID and I will add you to the project Show quoted text
>
> > And do you use IRC? I am EFNet #perlhelp all the time... > > I am also on irc.perl.org #catalyst quite a bit. > >
> I don't use (or like) IRC. Sorry. My brain works too slowly.
:-) Show quoted text
>
> > http://seamstress.sourceforge.net/ is the Seamstress jump-off point.
> Just had a look and subscribed to mail list.
> > > > And are you using Seamstress in a web application framework?
> I'm not sure :-). I'm redeveloping a website for a choir I sing with > and using this as an excuse to put my limited knowledge of Catalyst to > practical use. I've developed commercial products in Mason and > CGI::Application/HTML::Template and started using TT but all of them > require me to switch brain spaces too much (that slow brain thing > again). I've been using XML DOM's and Javascript DOM's for a long time > so Seamstress and Tree just seemed to fit in. > I'm at the stage of > building a skeleton and putting up a few pages with some dynamic > content. If things pan out as well as the preliminary stuff I've done > seems to indicate, yes, I will use the Cat::Seamstress plugin. (I've > committed to a working site by 30th Jan just to give me some > motivation.)
Catalyst is quite advanced. I struggle with it. Once you master it, it is a powerful tool. I personally have found CGI::Prototype to be an easy and logical progression from CGI::Application, but Catalyst is a very huge step away. Show quoted text
> > > > The Quickstart guide I just added to Seamstress explains that new > > html() > > method. > >
> Very useful stuff for beginners. You cover most of this in the > references you give in H::S pod but it's good to have it in one place. >
> > I am doing a whole lot of stuff as I rework the Catalyst examples in > > Seamstress... > >
> I'm really interested in Cat stuff and have been doing exactly the same. >
> > these days I am manually making my .pm files until I can come up with a > > good way to bring spkg.pl up to speed. > >
> > What plans do you have for spkg?
Well, the new Quickstart guide shows two ways of creating LOOMs - the quick and dirty way and the slow and clean way. spkg.pl so far has supported the slow and clean way only. I think there should be support for both. Show quoted text
> > Anyway thanks again for Seamstress and I hope I can contribute a bit.
Sure Show quoted text
> > Cheers
Cheers Show quoted text
> > Gary > >
-- Play me in correspondence chess: http://slowchess.com/profile.php?username=tbrannon
Ok, I think this is fixed now.