Re: [cgi-prototype-users] Re: Package name output
> "LD" == LD <[EMAIL PROTECTED]> writes: LD> Possibly - but its real name (e.g., "Main") is properly spat out when LD> such a definition is within a template file; but not with the LD> above. Perhaps it needs detainting to work... >From within a template file, "self" is a named class, if you're using CGI::Prototype::Hidden. I'm not sure how you're using the file above, but I bet "self" is not a named class any more. LD> Ahh, yep - that works. Cheers. Good. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 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! --- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 ___ cgi-prototype-users mailing list cgi-prototype-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cgi-prototype-users
Re: [cgi-prototype-users] Re: Package name output
Hi there, On 03/05/2005, at 9:28 PM, Randal L. Schwartz wrote: LD> sub someTemplate { \ <<'EOT'; } LD> [% self.CGI.header %] LD> [% self.CGI.h1(self.reflect.package) %] LD> EOT LD> ...I <..> get something like: PKG0x958d0c Well, that's probably the actual package name of that lightweight class. Possibly - but its real name (e.g., "Main") is properly spat out when such a definition is within a template file; but not with the above. Perhaps it needs detainting to work... local $_ = $self->shortname; tr/_/ /; tr/::/ /; s/\b([a-z])/\U$1/g; Ahh, yep - that works. Cheers. "This (and other) tips will be found in the forthcoming CGI::Prototype::Cookbook, coming soon to a CPAN near you. Offer void where prohibited." No doubt it'll be a useful resource... with regards, -- LD --- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 ___ cgi-prototype-users mailing list cgi-prototype-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cgi-prototype-users