Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I agree with your final revision to the documentation string. The doc text truly doesn't make much literal sense. And unless one has perfect Perl Monk karma, I don't see how one can easily intuit the difference between scalar context in a looped vs. non-looped context. The purpose of documentation is (presumably) to help those who are not yet experts. In this case, I humbly propose that the documentation fails to adequately and properly document the behavior in scalar context.

Also what happens when glob is called in a function that is embedded in a loop? Either way I can imagine challenges. If it is still considered in a loop then the behavior for example of glob used somewhere deep in a module funciton would vary depending on whether it was at some level called from something in a loop. On the other hand if calling it from a function that is embedded in a loop behaves differently from calling directly, then again you have an odd behavior where simply wrapping 'glob' in a function call would change its behavior.

To me, this still seems quite flaky and upnredictable. At a minimum, it deserves copious documentation to explain the behavior and potential issues.

In reply to Re^2: Using grep and glob to find directories containing file by Anonymous Monk
in thread Using grep and glob to find directories containing file by Anonymous Monk

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 goofing around in the Monastery: (4)
As of 2024-03-19 05:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found