Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
There's a warnings::unused module, but the bug log for it notes that it can segfault, which makes me less than enthusiastic about trying it out.

Yeah, so? It's not as if you would leave this module in production, would you?

The author has been honest enough to admit that the module is not perfect. This will at least stop you from wasting precious time trying to determine why your code is segfaulting.

If the module indicates one unused variable, you're already ahead. If your code manages to provoke a segfault, then you could try and cut down the code down to a minimal test case and file a bug report. That way the author hears about it and can attempt to address the problem.

It may be that w::u will never be segfault-free. But I'll be willing to bet that when it does crash, it will do so on a dubious code construct that's probably best rewritten anyway.

I know I restructured a few of my published modules quite extensively when early versions of Devel::Cover crashed trying to process their test suites. I was more interested in getting coverage analysis and thus bending my code to work with D::C rather than the other way around. I observed that the code I had to write to work with D::C was simpler to understand anyway. (More recent versions are far more robust, so one is less likely to encounter the scenario these days, but the lesson still holds true).

• another intruder with the mooring in the heart of the Perl


In reply to Re: Warnings on unused variables? by grinder
in thread Warnings on unused variables? by AZed

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-19 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found