2000-08-07-19:22:59 Michael Fowler:
> Is $CURRENT_PACKAGE any different, value-wise, than __PACKAGE__?

I'm guessing no, unless I've misunderstood something from the
preceeding discussion.

> Is there a reason to prefer it?

I suppose some folks who want to do a truly stunningly huge amount
of this stuff might want to get an variable they can slightly more
easily interpolate, and don't want to just

        my $CURRENT_PACKAGE = __PACKAGE__;

right after the "package" declaration. But you'd really have to be
doing a _huge_ amount to pay for the extra
documentation/implementation complexity.

> I understand it can be interpolated, making it easier to use
> within a string, but weigh that against adding yet another special
> variable, for a value that's already available otherwise.

and if you don't want to do a gigantic amount of it, stuff like

        bless { "@{[__PACKAGE__]}stuff" => 0, ... }, $self;

isn't too bad.

-Bennett

PGP signature

Reply via email to