From: <me...@st...> - 2005-05-03 11:29:56
|
>>>>> "LD" == LD <lds...@ya...> writes: LD> Hi there, LD> If I have the following as part of a template definition (in a file): LD> [% self.CGI.h1(self.reflect.package) %] LD> ...it returns the proper name as expected. If I however do: LD> sub someTemplate { \ <<'EOT'; } LD> [% self.CGI.header %] LD> [% self.CGI.h1(self.reflect.package) %] LD> EOT LD> ...I instead get something like: PKG0x958d0c Well, that's probably the actual package name of that lightweight class. Here's what I did for a client recently. In App.pm, I added sub title { my $self = shift; local $_ = $self->shortname; tr/_/ /; s/\b([a-z])/\U$1/g; return "Initech Corporation Conference Registration: $_"; } And in my WRAPPER.tt, I have: [% self.CGI.start_html("-title", self.title) %] This defines the default titlebar related to the state name. And yet, any specific state can provide sub title { "Acquiring Remote Latinum" } to override that. "This (and other) tips will be found in the forthcoming CGI::Prototype::Cookbook, coming soon to a CPAN near you. Offer void where prohibited." ;-) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <me...@st...> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! |