Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Today I used File::Find for the first time. It worked very nicely for what I wanted to do, the only gripe I had about it is that part of the interface uses global variables and gives the warning "don't touch". For example for the 'wanted' subroutine that is passed to 'find', it is not passed any parameters, it is required to use the global variables   $File::Find::dir,$_, and $File::Find::name .
For my quick script that I was using this wasn't a big deal, but I could see if I was using this module a lot I would want to change the interface a little bit, so the 'wanted' routine actually recieved this information through "@_" instead of through global variables. This is a scenario that I have run into many times, where there is a module that has the functionality I want, but an interface that I don't like. How do you usually handle this situation, do you:
1. Live with the interface
2. Create a wrapper class with a different interface
3. Write a whole new class
4. Something else?

In reply to When should a wheel be reinvented by fletcher_the_dog

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

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

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

    How do I use this? | Other CB clients
    Other Users?
    Others studying the Monastery: (9)
    As of 2019-10-21 14:52 GMT
    Find Nodes?
      Voting Booth?