Maybe they are complaining about the fact that File::Find does most of its communication through global variables.

Does it really use global variables (err, variables in the main package; I assume it doesn't use the truly global punctuation variables, other than for their intended uses), or does it use package variables in its own package? The former would be very messy; the latter isn't nearly so bad. It wouldn't make sense for an OO module (like DBI), but for a module with a function interface it seems reasonable enough to me.

I suspect the OP may be right, and that they may be complaining about passing anonymous functions around. Anybody with a solid familiarity with Perl (or any other language that supports the functional paradigm) will be reasonably comfortable with this, but a newbie coming in from another language (especially a procedural or OO language) may have trouble with it at first. This is not surprising; it's a different paradigm than the ones they're familiar with. They'll also have trouble at first with the list operators, and if you show them closures you'll want to have a camera handy to take a snapshot of the funny looks on their faces. This will pass with time, as they learn the different paradigms that Perl supports and why each is useful. (If they like OO, it may help to tell them that lexical closures are one way to achieve encapsulation. That may spark their interest enough to get them to learn something, instead of turning away in disgust.)


;$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$;[-1]->();print

In reply to Re: File::Find considered hard? by jonadab
in thread File::Find considered hard? by Jenda

Title:
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, details, 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, summary, 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.