in reply to Re: Constant subroutines thoughts
in thread Constant subroutines thoughts
Why I used constant subroutines instead of doing use constant FOO => 'bar';? Because, as I saw everywhere else sub SOME_CONST{0}, and only now I discovered details about this.
Additionally I want to note that use constant FOO => 'bar'; internally does things similar to sub FOO(){'bar'} - I checked this right now.
Most important point of my initial message - that my places in programs, such as do{'a lot of debug stuff'} if DEBUG were NOT optimized away, whereas adding a prototype '()' to 'sub DEBUG' makes them to be optimized away!
Courage, the Cowardly Dog.
PS. Something fishy is going on there, or my name is Vadim Konovalov. And it's not.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Constant subroutines thoughts
by tadman (Prior) on Jun 09, 2002 at 13:31 UTC | |
by Courage (Parson) on Jun 09, 2002 at 14:16 UTC |