Hi Everyone,
Is there a mechanism which will allow me to create a pp'd binary which
can self-update from a PAR::Repository at run-time?
I can create a script which will make use of the PAR::Repository, but
as soon as I create a pp'd binary (EXE or .par), the repository is no
longer used.
Here's what I've got as a demo:
demo $ find . -type f
./blib/Demo.pm
./demo.pl
./Demo.pm
demo $ cat demo.pl
use PAR { repository => 'file:///tmp/demo/repo',
fallback => 0, # check repo first
};
use Demo;
print "$Demo::ORIGIN\n";
demo $ cat Demo.pm
package Demo;
our $ORIGIN = 'builtin';
1;
demo $ cat blib/Demo.pm
package Demo;
our $ORIGIN = 'repo';
1;
demo $ perl -MPAR::Dist -e 'blib_to_par(name=>"Demo",version=>"0.1")'
Successfully created binary distribution
'Demo-0.1-darwin-2level-5.16.0.par'.
Its contents are accessible in compliant browsers as:
jar:file:///private/tmp/demo/Demo-0.1-darwin-2level-5.16.0.par!/MANIFEST
demo $ parrepo create
Creating new repository at 'repo'.
demo $ parrepo inject -f Demo-0.1-darwin-2level-5.16.0.par
Injecting file 'Demo-0.1-darwin-2level-5.16.0.par' into repository.
demo $ pp -M PAR::Repository::Client -M DBM::Deep::Engine::File -o demo.exe
demo.pl
demo $ pp -M PAR::Repository::Client -M DBM::Deep::Engine::File -p
-o demo.par demo.pl
demo $ perl demo.pl
repo
demo $ parl demo.par
builtin
demo $ ./demo.exe
builtin