On 2005-12-20, Michael Graham <[EMAIL PROTECTED]> wrote:
>>
>> I want CGI::Apps to eventually have something like 'mark par'. Part of
>> 'mark par' conuld involve altering the configuration to adjust this.
>> Exactly how...I'll leave to someone else.
>
> Yeah, I want that feature too! One of the main barriers IMO is making
> C::A-based apps relocatable - i.e. they don't care where in the
> filesystem they run from. I'd even be in favour of first class
> methods for this purpose, if people would use them:
>
> my $root = $self->root_dir;
> my $uri = $self->root_uri;
> my $path = $self->relpath('foo/bar/baz');
>
> Maybe a CAP::Relpath plugin that CAP::PAR could depend on :)
>
> Anyway, someone can correct me if I've got the details wrong, but I
> think that when a PAR file is first run, it creates a randomly named
> directory in either /tmp or the user's home dir. Into this directory it
> unpacks all of its modules, scripts and datafiles.
>
> So at the time when you package up the app, this directory doesn't
> actually exist yet, so you can't edit the config files to point to it.
>
> It would have to be done via a config plugin that computes a value for
> 'root_dir' based on the runtime value of $ENV{'PAR_TMP'}.
I can say two things:
1. Here's the source for most of the PAR-related logic that Catalyst
uses:
http://search.cpan.org/src/SRI/Catalyst-5.61/lib/Module/Install/Catalyst.pm
It doens't do anything with this environment variable.
2. My hard drive has started to make a noise that concerns me. I hope
it's just cold. (Could be. It's -5F as I prepare to walk to work!)
Mark
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]