Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Syntactic Confectionery Delight
 
PerlMonks  

Re: RFC: new module r (or R)

by stvn (Monsignor)
on Mar 05, 2004 at 18:52 UTC ( #334321=note: print w/ replies, xml ) Need Help??


in reply to RFC: new module r (or R)

I think that sam has a good point. This would make a good script, but I disagree that it wouldn't make a good module. As it stands now, with all the work being done in import and with @ARGV, it is not really reusable outside of the command line scenario. But if you refactor the code, you could easily make it useable in other scenarios as well. Allowing arguments other than through @ARGV and making import check its execution context before it does any magic would increase the usefulness of this module immensly.

And then package the script in your CPAN distribution, and you get the best of both worlds. This too would allow you to name the module better, as R is incredibly un-descriptive and tells me absolutely nothing about what it does.

Basically I think that you have some good things going here, and to restrict its usefulness to one scenario would be a waste of your effort.

-stvn


Comment on Re: RFC: new module r (or R)
Select or Download Code
Re: Re: RFC: new module r (or R)
by jryan (Vicar) on Mar 06, 2004 at 04:03 UTC

    But why is it bad that it is only useful from a command-line scenario? Why does it have to be extended? It seems perfectly designed for what it would be most useful for.

      But why is it bad that it is only useful from a command-line scenario?

      It's not that it is bad, its that it could be useful in many other scenarios too, so why restrict it? Processing directories recursively is something i run into quite often actually, and not always on the command line. If he could offer a module interface to it as well, I know I would find it alot more useful. But hey, this is all just my opinion.

      - stvn

        Yeah, but there are already about ten thousand modules out there for recursing through directories that we can use within programs. Why would we need another one?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://334321]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2014-04-19 23:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls