Dan Sugalski wrote: > >IMO the name of the currently executing sub should be accessed via an > >extention to C<caller()>. > > > > caller{subname} > > Oh? What prints, then? > > $foo = sub {print caller{subname}}; > $foo->(); something like CODE(0x80cfd7c) since we don't have a better name for it. --- warning --- bad idea follows --- Are we willing to let user-code use codereftagstrings abckwards yet? perl -le '$a = \(1..4); $tagstring="$a"; print @{$tagstring}' We would eliminate all strings matching /^[A-Z]\(0x[0-9a-f]+\)\z/ from use as variable names. I don't think that would break all that much but the 5->6 converter could identify ref->stringify and mung it slightly, maybe add a \0 at the end or something. We would gain C style casting capability, with all the evil that brings with it, including the ability to bittwiddle perl structures from within perl, which is a feature migrating C programmers miss. But we would need to check every instance of X{$Y} where X is a syntactic variable-type-identifier against the it's-a-refstring regex. Maybe a pragma to turn these checks on? use unsafe_string_dereferences would anyone use it? -- David Nicol 816.235.1187 [EMAIL PROTECTED] www.tmcm.com, dammit
- Re: assign to magic name-of-function variable instead ... James Mastros
- Re: assign to magic name-of-function variable inst... Johan Vromans
- Re: assign to magic name-of-function variable ... James Mastros
- Re: assign to magic name-of-function varia... Bart Lateur
- Re: assign to magic name-of-function ... James Mastros
- Re: assign to magic name-of-funct... abigail
- Re: assign to magic name-of-funct... James Mastros
- Re: assign to magic name-of-funct... Branden
- a name for the currently executin... David L. Nicol
- Re: a name for the currently exec... Dan Sugalski
- Re: a name for the currently exec... David L. Nicol
- Re: a name for the currently exec... Peter Scott
- Re: a name for the currently exec... Dan Sugalski
- Re: a name for the currently exec... Nicholas Clark
- Re: assign to magic name-of-function ... James Mastros
- Re: assign to magic name-of-function varia... John Porter
- Re: assign to magic name-of-function variable instead ... John Porter
- Re: assign to magic name-of-function variable inst... David L. Nicol
- Re: assign to magic name-of-function variable ... James Mastros
- Re: assign to magic name-of-function varia... David L. Nicol
- Re: assign to magic name-of-function variable instead of &q... John Porter