dws has asked for the wisdom of the Perl Monks concerning the following question:
This puzzled me. Why not just dosub new { my $pkg = shift; my $self; { my %hash; $self = bless(\%hash, $pkg); }
Is this a trick to make HTML::Template run under mod_perl? Superstition on the part of the author? Deep magic?Anyone?sub new { my $pkg = shift; my $self = bless {}, $pkg;
Running into stuff like this throws me off balance; it feels like there's more going on than meets the eye.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(crazyinsomniac) Re: Odd constructor in HTML::Template
by crazyinsomniac (Prior) on Mar 29, 2002 at 07:24 UTC | |
by drewcifer (Novice) on Mar 29, 2002 at 13:42 UTC | |
by merlyn (Sage) on Mar 29, 2002 at 14:21 UTC | |
by impossiblerobot (Deacon) on Mar 29, 2002 at 16:32 UTC |