3 ms·
Again, that's kind of a straw man. All scripts are "just a bunch of code in a file". You're equating your organization using Moose to the inability to organiz
by ajross 17y ago
Again, that's kind of a straw man. All scripts are "just a bunch of code in a file". You're equating your organization using Moose to the inability to organize code without it, which is silly.
You're also equating "abstration" with "good", which it isn't. You abstract for practical reasons, not for its own sake.
- jrockway 17y agoThe abstraction makes it easy to reuse parts of your "one-off" scripts. For example, look at the number of CPAN modules/programs that implement some sort "restart when file is changed" functionality. There are a lot. If you use MooseX::Runnable, though, you write an introspectable class instead of a script. Now a plugin can handle adding this functionality to your script in a structured way, and all you, the developer, have to do is say "mx-run +Restart::Auto My::Class" instead of implementing that functionality manually in your script. Reuse is always good. Not writing code is even better.