Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Extra strict subs

by theorbtwo (Prior)
on Nov 27, 2002 at 01:47 UTC ( [id://215991]=note: print w/replies, xml ) Need Help??


in reply to Extra strict subs

Does this have to be a normal-use thing, like use strict, or could it be a -MO=Lint thing? (IE a slow check that you do occasionaly.) The former's going to be a lot harder then the later... I'm not even sure if it's really possible... perl's a damn dynamic language. It'd rule out AUTOLOAD tricks, imported subs (?), all sorts of other stuff...


Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

Replies are listed 'Best First'.
Re: Re: Extra strict subs
by Elian (Parson) on Nov 27, 2002 at 02:18 UTC
    A normal use thing, like use strict. Yes, it would mean that you couldn't play some of the fancier tricks but, well, too bad, that's what you asked for when you used the pragma. :)

    if I do it right, it won't stop imported subs, nor subs you declare but don't define, so you can AUTOLOAD later. You'll have to have a "sub foo;" somewhere, to make sure the foo sub's noted, but that's fine.

    I expect this will end up tallying the subs that are used in the blocks that it's in force, then at CHECK time making sure there are entries in the GV slot of the appropriate symbol table entries, but as I said I've not nailed down exactly how it'll behave yet.

      Sounds like it'll work. It'd be nice, however, to be able to say use strict; no strict 'super-subs'; or somthing to get existing use strict 'subs' behivor, but not the new behavor.


      Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

        You won't have to--as I said, while we may co-opt some of the underlying mechanisms, it won't affect normal stricture in any way. It'll look and act separately from stricture. (Don't worry, beefing up strict at this point would be rather a bad thing, which I do realize :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://215991]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-04-16 06:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found