[Catalyst] Catalyst::Utils->class2tempdir

p p quain7 at gmail.com
Mon Jan 10 10:51:14 GMT 2011


when we have catalyst app named My::App, when starting it
creates catalog /tmp/my/app.

later when we try to start My::App2 as a different user, it
fails as /tmp/my is owned by the user of My::App and
due to permissions /tmp/my/app2 cannot be created.

small change in tmpdir scheme from /tmp/my/app to
/tmp/my_app would solve such permissions problems

in Catalyst::Utils instead of

my @parts =3D split '::', lc $class;
my $tmpdir =3D dir( File::Spec->tmpdir, @parts )->cleanup;

could be

my $path=3D lc $class;
$path =3D~ s/::/_/g;
my $tmpdir =3D (File::Spec->tmpdir,$path)->cleanup;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110110/252d8=

More information about the Catalyst mailing list