From: Terrence B. <tbr...@in...> - 2009-07-21 21:48:57
|
Whatever the final solution is, it will need to require a 'html_file' attribute and provide a 'html_tree' attribute: package HTML::File::Index; use HTML::LOOM; has_loom => (html_file => "templates/index.html", id => [id => 'name'], welcome => [id => 'welcome']) ; my $i = HTML::File::Index->new; $i->name->replace_content('new_data'); On Tue, Jul 21, 2009 at 3:40 PM, Terrence Brannon <met...@gm...>wrote: > i was fooling around today and finally got some great help from Shawn Moore > and Chris Prather in #moose. > > I've started fooling around with a way to have accessors for an HTML::Tree > .... nowhere near CPAN publish level yet > > <http://code.google.com/p/cpan-modules/source/browse/tmp/try6.pl> > > package Get4; > > use LookDown; > use HTML::TreeBuilder; > > has file => ( > is => 'rw', > default => 'file.html' > ); > > has tree => ( > is => 'rw', > lazy_build => 1 > ); > > |