[Catalyst] Suggestions for CatalystX::Installer

Matt S Trout dbix-class at trout.me.uk
Thu May 29 06:57:31 BST 2008


On Wed, May 21, 2008 at 05:15:54PM -0500, Paul Cain wrote:
> > #What The Developer Does
> >
> > $ catalyst MyApp
> > $ cd MyApp
> > $ catalystx-installer [options]

Why can't this be a script/myapp_create.pl Installer ?

> > 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

> > 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.

You'd be better making it easy for the de veloper to trial an install - then
if that fails, you know they screwed up their Makefile.PL and you can point them
at documentation to fix it.

We're trying to write an installer here, not a bandaid for incompetence.

> >  It then
> > runs through the installation scripts while keeping the user informed
> > of its progress:
> >
> > $perl Makefile.PL
> > $make
> > $make test
> > $make install

You miised 'make installdeps'.

> > [3] Should script/myapp_setup.pl exist in a PAR archive in order to
> > prevent the problem of the script not running because of missing
> > dependencies?

Yes, or bundle its own local::lib.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/



More information about the Catalyst mailing list