Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Should I upload it on CPAN?

by BrowserUk (Patriarch)
on Feb 23, 2012 at 00:05 UTC ( [id://955644]=note: print w/replies, xml ) Need Help??


in reply to Re: Should I upload it on CPAN?
in thread Should I upload it on CPAN?

I got the script itself down to just two lines of code. The bulk of the code is in Module::Reprove, while App::Reprove handles command-line processing, output to the terminal, etc.

Are either of those two modules useful for anything standalone?

If, as I suspect, the answer is no, then what the &%&^%&^ is the point of making them separate modules?

And what is the point of a 3 line script?

It's like saying you've built a personal flying machine that only weights 20 kgs. You just put it on and board any jet that going where you want to go.

It's this kind of pseud-OO bullshit that makes CPAN a pain to use.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?

Replies are listed 'Best First'.
Re^3: Should I upload it on CPAN?
by chromatic (Archbishop) on Feb 23, 2012 at 02:40 UTC
    And what is the point of a 3 line script?

    I used to think that too, but I've moved more and more of my programs into modules and used wrapper scripts to invoke them with the most common arguments already defined. It's improved the testability and usability of a lot of my code. Otherwise I ended up with a lot of shell aliases to invoke modules—and there's not much documentation there.

      Let's see.

      2 modules; 2 namespaces; and two hundred and eighty eight support modules:

        Isn't it amazing how technology is giving us ever more powerful ways of creating unbelievable (and unintelligible) complexity from simplicity.

        The same twelve tone western scale that allows Handel's music for the royalfireworks, Beethoven's symphonies, and Mozart also allows autotuned and sampled radio pop performed by talentless hacks. You can (rightly) decry the latter without diminishing the former.

        Then again, Liszt would have fit right into the LA party scene.

        I'm not entirely sure what your point is.

        # lib/App/Apache/Wrapper.pm { package App::Apache::Wrapper; use Moose; has 'apache_path' => ( is => 'ro', isa => 'Str', ); sub run { my $self = shift; system($self->apache_path); } } # apache.pl use App::Apache::Wrapper; App::Apache::Wrapper -> new(apache_path => '/usr/sbin/httpd') -> run;

        The fact that a program consists of instantiating a single object and calling a single method on it, is not necessarily an indication of the complexity of the program as a whole.

        Yes, it's frustrating that App::Reprove has not worked for that person. On the whole its test results are reasonably good (about 90% pass) though there's room for improvement. I'm sure that by dropping MooseX::Declare (which is still pretty experimental) I could push that up to pretty close to 100%. But I have no immediate plans to do that. Maintaining Module::Reprove is not my main priority in life. Patches welcome though.

Re^3: Should I upload it on CPAN?
by tobyink (Canon) on Feb 23, 2012 at 00:47 UTC

    Module::Reprove certainly is. App::Reprove probably less so. But a good reason to modularise code is to make it extendable using the well-understood mechanism of inheritance.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-24 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found