[32413] in Perl-Users-Digest
Perl-Users Digest, Issue: 3680 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 30 09:09:19 2012
Date: Mon, 30 Apr 2012 06:09:02 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 30 Apr 2012 Volume: 11 Number: 3680
Today's topics:
Re: delete object <ben@morrow.me.uk>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 29 Apr 2012 21:07:13 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: delete object
Message-Id: <hkj079-pum.ln1@anubis.morrow.me.uk>
Quoth Rainer Weikusat <rweikusat@mssgmbh.com>:
>
> I'd like to expand a little on that: There's an obvious reason why a
> glob should hold a refcounted pointer to a subroutine associated with
> the name mapped to this glob: Like any other kind of Perl object, the
> subroutine is supposed to go away once it isn't referenced anymore and
> the glob pointer is one of the anchors keeping it in 'known space':
> For as long as the subroutine is still associated with the name in
> question, it can still be called. OTOH, having a back pointer from the
> CV to this one particular glob seems to be singularly weird design
> descision since any number of names may resolve to the same
> subroutine and may be associated with and disassociated from it at any
> given time. Consequently, I would really like to know why a named
> subroutine has a pointer to the glob originally pointing to it: To me,
> this looks very much as if it was either and ill thought-out attempt
> at 'optmizing' something or simply a design error.
Mostly, so that a sub knows its own name, including which package it
belongs to. Yes, a sub can have many names; but only one of these is its
'real' name, and e.g. only that name will be reported by caller(), and
by core error messages relating to that sub. Knowing the sub's package
is also important, and is used by (among other things): AUTOLOAD, to
know which $AUTOLOAD to set, and what to set it to; sort, to know which
$a and $b to set; and SUPER::, to know where to start chasing @ISA from.
Ben
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 3680
***************************************