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

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.


Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://334321]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2018-06-19 13:32 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (114 votes). Check out past polls.