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...
tr/::/ /;local $_ = $self->shortname; 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