[perl #36623] Deleting Globals/Lexicals

1 view
Skip to first unread message

Matt Diephouse

unread,
Jul 21, 2005, 3:17:34 PM7/21/05
to bugs-bi...@rt.perl.org
# New Ticket Created by Matt Diephouse
# Please include the string: [perl #36623]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=36623 >


There's currently no way to delete a global or a lexical.

<chip> mdiep: you should be able to delete a global and (in the
current system) a lexical, though a different way
<chip> mdiep: so that'd be a bug

--
matt diephouse
http://matt.diephouse.com


Leopold Toetsch

unread,
Jul 23, 2005, 7:21:34 AM7/23/05
to perl6-i...@perl.org, bugs-bi...@netlabs.develooper.com
Matt Diephouse (via RT) wrote:
> # New Ticket Created by Matt Diephouse
> # Please include the string: [perl #36623]
> # in the subject line of all future correspondence about this issue.
> # <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=36623 >
>
>
> There's currently no way to delete a global or a lexical.

Globals:

.local pmc ns
.include "interpinfo.pasm"
ns = interpinfo .INTERPINFO_NAMESPACE_ROOT
delete ns["foo"]

(untested - see also t/pmc/namespace.t)

Lexcials:

.local pmc pad
pad = peek_pad
delete pad["foo"]

(see also t/pmc/scratchpad.t)

leo

Reply all
Reply to author
Forward
0 new messages