Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: perl compiler optimizer curiosity (Troubleshooting and Logging/Debugging References)

by eyepopslikeamosquito (Archbishop)
on Mar 12, 2022 at 06:33 UTC ( [id://11142025]=note: print w/replies, xml ) Need Help??


in reply to perl compiler optimizer curiosity

Assuming (like me) you generally prefer logging to crack-pipe debugging sessions, have you considered more mainstream alternatives to your home-grown debug subroutine ... such as Log::Log4perl or Smart::Comments?

See also:

Building Perl References

Troubleshooting References

Logging References

CPAN:

Perl Monks:

Debugging References

Perl core docs:

Other:

See Also

Many references were added later, long after the initial reply was made.

  • Comment on Re: perl compiler optimizer curiosity (Troubleshooting and Logging/Debugging References)
  • Download Code

Replies are listed 'Best First'.
Re^2: perl compiler optimizer curiosity
by Fletch (Bishop) on Mar 12, 2022 at 07:00 UTC

    Seconding these recommendations. Log4perl overhead will be similar to your solution in the disabled case (a sub call immediately returning, which while negligible is something) and the flexibility it offers is well worth that. Smart::Comments on the other hand if not enabled are truly just comments with no overhead save skipping over during compilation (same as any other comment). The catch is that it uses mildly ebil source filtering to work so be aware (although I can’t offhand recall a time or two it ever caused problems nor actually enumerate what they were). Personally I’ve mostly moved to using l4p exclusively.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

Re^2: perl compiler optimizer curiosity
by 1nickt (Canon) on Mar 12, 2022 at 17:43 UTC

    See also Log::Any.

    The way forward always starts with a minimal test.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-23 20:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found