[Catalyst] Suggestions for CatalystX::Installer
Jonathan Rockway
jon at jrock.us
Thu May 29 20:27:42 BST 2008
* On Thu, May 29 2008, Matt S Trout wrote:
>> > my $sql_commands=CatalystX::Installer::Controller->new();
>> > $sql_commands->set_type('Entry');
>> > $sql_commands->set_action(sub{
>> > my ($self, $c,$database,$sql_file);
>> > system "sqlite3 $database < $sql_file";
>> > });
>
> Hmm. That smells a bit like Class::Workflow and/or Verby
Yes, definitely Verby. You really want actions to be classes, so you
can customize them easily.
>
>> > First, it scans for dependencies with Module::ScanDeps, and adds any
>> > dependencies not already found in Makefile.PL to Makefile.PL.
>
> No it doesn't That's a terrible, *terrible* idea. ScanDeps is heavy on the
> system and doesn't always get things right; I've seen it go rogue a
> few times.
Well, I think the idea is to pick some correct defaults that won't go
rogue (-c probably), run that, and then suggest to the developer that he
should consider adding the dependencies himself. The need for human
interaction is due to the fact that M::S will gladly say your app needs:
URI::http
URI::file
URI::dongs
URI::ftp
...
when you really only need "URI". Of course, a quick query of the CPAN
packages database can help the program help the user make a better
decision. ("Hey, these all come with URI-0.123476. Do you want *that*
to be the prereq instead?".)
Also, if someone wants to write a module to add dependencies to
Makefile.PLs, I would be happy to use it. This:
http://git.jrock.us/?p=elisp.git;a=blob;f=_local/cperl-project.el;hb=HEAD
needs to die very soon. I would rather have PPI (via Stylish) deal with
it. </aside>
> You missed 'make installdeps'.
"installdeps" is a dependency of "all", so it will probably Work Out All
Right.
Regards,
Jonathan Rockway
--
print just => another => perl => hacker => if $,=$"
More information about the Catalyst
mailing list