App-rlibperl
view release on metacpan or search on metacpan
lib/App/rbinperl.pm view on Meta::CPAN
If plack and your web framework are installed into a local lib
this won't work. Instead you can do this:
#!/home/username/perl5/bin/rbinperl plackup
require 'mywebapp.pl';
It's almost as easy, and makes the rest
(loading your local lib) transparent.
=head1 BUGS AND LIMITATIONS
Unfortunately the shebang described above isn't entirely portable.
If you are on an operating system that doesn't allow
using another script (as opposed to a binary) in the shebang,
you may be able to use a work around like this instead:
#!/bin/sh
eval 'exec perl /home/username/perl5/bin/rbinperl plackup $0 ${1+"$@"}'
if 0;
require 'mywebapp.pl';
It's a slight variation of a common perl/shebang idiom.
See L<App::rlibperl/BUGS AND LIMITATIONS> for more.
=head1 SEE ALSO
=over 4
=item *
L<App::rlibperl>
=back
lib/App/rlibperl.pm view on Meta::CPAN
the order will be reversed: it will look for C<./lib> first.)
Lastly it will check for simply C<../lib>.
${root}/bin/rlibperl
${root}/lib
If you have another directory structure you think should be supported
please send suggestions!
=head1 BUGS AND LIMITATIONS
The initial use-case for C<rlibperl> was
installing via L<local::lib>
(or without it using something like C<cpanm --local-lib /other/dir>)
and calling like so:
$ /path/to/local-lib/rlibperl -perl-args
(It may also be useful in a per-project setting,
though it's likely easier to make custom scripts
( run in 0.496 second using v1.01-cache-2.11-cpan-4d50c553e7e )