[Catalyst] Catalyst and Dist::Zilla?

Bill Moseley moseley at hank.org
Fri Jul 6 16:06:57 GMT 2012

On Fri, Jul 6, 2012 at 4:42 AM, Eden Cardim <edencardim at gmail.com> wrote:

> What I've done before is to move root and other directories into share
> and use the ShareDir plugin. You will need to adjust $c->path_to to
> point to the share dir appropriately, I've been planning to submit a
> patch for this, but haven't found the time.

So you are saying move root to share/root and let everything in root get
managed like a share directory?

$c->path_to uses $c->config->{home} as its base.   So, it's really
$c->config->{home} that would need to be changed, right?
$c->config->{root} is based of $c->config->{home}, too.   Which means
everything in the app's home directory would need to move, too -- like
config.yml (or whatever you use) and any other files or directories that
were placed there.

File::ShareDIr also acts a bit differently than how the current home and
root work.

For example, "prove -vl t/test.t" and "prove -vb t/test.t"  (lib vs. blib)
currently will both use the same home (and therefore root).   Since -b uses
blib/lib then Catalyst probably should also use blib/lib/<App>/root to be
consistent, right?

File::ShareDire might help that, though.

File::ShareDir expects an auto directory -- so "prove -vl" won't work
(because File::ShareDir expectes to find lib/auto which likely doesn't
exist in the source).

"prove -vb" works because File::ShareDir looks for blib/lib/auto/<App>, and
things in "share"get copied then when running "make".

I tend to use prove -vl quite often, so that's a problem when also using
File::ShareDir.  (Maybe there's a solution I'm not aware of).

I like the idea of using share for root -- just because it uses the
Makefile to copy files (when needed) instead of Module::Install::Catalyst's
method of copying all files every time when running Makefile.PL.  I've got
over 5500 files in my root.

Maybe all that's needed is Catalyst::Util's home function to figure out if
running out of lib or from an installed location (prove -l  vs. prove -b)
so it can use the right "root" using existing methods or via File::ShareDir.

Still, not sure I'd want to move the app configuration out of the app home.

-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120706/74dc2=

More information about the Catalyst mailing list