Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Core module: Attribute::Handlers behaviour

by Anonymous Monk
on Oct 20, 2012 at 06:34 UTC ( #1000104=note: print w/ replies, xml ) Need Help??


in reply to Core module: Attribute::Handlers behaviour

use constant, don't use attributes to control tracing

Also, post an example of what you're talking about


Comment on Re: Core module: Attribute::Handlers behaviour
Re^2: Core module: Attribute::Handlers behaviour
by enigma (Novice) on Oct 20, 2012 at 06:52 UTC

    Thanks for quick response.

    In my openion use constant; is a good solution for debug/info/error msgs. But if we are talking about tracing ...

    it is like in log file ...

    [<date_time>] TRACE: entering sub for ... [<date_time>] TRACE: parameters passed ... [<date_time>] TRACE: exiting sub for ...

    as core module add attribute features during compilation only, there is less performance issue...less cluttering in your code. as compared to explicitly writing entry/exit for each module.

      Sounds like a cool and effective use of attributes to me. But still, you are more likely to get help with the problem if you supply code people can try.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

      RIP Neil Armstrong

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2014-09-17 01:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (55 votes), past polls