Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
The problem with the interface is that it is almost entirely lacking. As the user you must provide the code to do the finding, the ignoring and the collecting whereas the module merely provides the code to get you there. Nearly every other module in the core provides an API to do the common things one might expect. File::Find, however, rather abruptly lumps you with a single function which you must fashion into something desirable. When your code is called the available information is limited to the filename, directory name and the file's path with any other information you may require to be extrapolated manually. That's not to mention the complete lack of control in how your code is used i.e no callback, no yielding, no iteration. All this wouldn't be so bad if the code wasn't so positively inextricable. Suffice it to say, what makes File::Find's interface so commonly hated is that it is an assault upon the sensibilities of anyone who encounters it, novice or wizard.
HTH

_________
broquaint


In reply to Re: What makes File::Find's interface so commonly hated by broquaint
in thread What makes File::Find's interface so commonly hated by demerphq

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 rifling through the Monastery: (7)
As of 2024-03-28 11:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found