Re: Should I upload it on CPAN?
by JavaFan (Canon) on Feb 20, 2012 at 15:07 UTC
|
CPAN is full of modules, but sparse on programs/scripts/utilities. CPAN is like a Home Depot, full of construction material, and not much plug-and-play.
I'd say please do option A. That's what CPAN needs, more than it does B. | [reply] |
Re: Should I upload it on CPAN?
by Anonymous Monk on Feb 20, 2012 at 02:41 UTC
|
| [reply] |
|
There's nothing wrong with asking if something might be of value to others before submitting to CPAN. Some people treat CPAN as merely a code repository, giving no thought to the value to others, as can be seen in poor API design, lack of documentation, poor distribution name, etc. Those people should instead upload to github or bitbucket. The best CPAN authors are those who take some time to think through the decision process.
| [reply] |
|
There's nothing wrong with asking if something might be of value to others before submitting to CPAN. And there is nothing wrong with NOT asking. The OPs specific question was about file-layout, not about what the software does.
| [reply] |
|
I developed them using eclipse, Module::Starter, and Module::Build. So I'll surely create a package in the style CPAN likes.
| [reply] |
Re: Should I upload it on CPAN?
by repellent (Priest) on Feb 20, 2012 at 21:33 UTC
|
Ship both! And thanks for contributing.
I've seen option A namespaced under App::*. What comes to mind are App::Ack, and App::cpanminus. | [reply] [d/l] |
Re: Should I upload it on CPAN?
by tobyink (Canon) on Feb 22, 2012 at 23:23 UTC
|
The trick with publishing non-modular software to CPAN, is to pull out as much code as possible into modules, and narrow the "script" part of it down to a few lines.
As an example... I developed a script called reprove as a result of a discussion in this monastery. 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.
| [reply] [d/l] |
|
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".
| [reply] |
|
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.
| [reply] |
|
|
|
|
|
|
| [reply] |