#!/bin/sh
#! -*-perl-*- # vim: set ts=2 sts=2 sw=2 expandtab smarttab ft=perl:
eval 'exec perl -x -wS $0 ${1+"$@"}'
if 0;
# PODNAME: rbinperl
# ABSTRACT: Execute perl using relative lib and assuming -S
use strict;
use warnings;
use FindBin; # core
use File::Spec::Functions qw( catdir catpath splitdir splitpath ); # core
# FindBin::Bin is a dir, so set $no_file to true for reliability
my ($vol, $dirs, $file) = splitpath($FindBin::Bin, 1);
my $perl = catpath($vol, $dirs, 'rlibperl');
# re-invoke perl with the -S
# FIXME: is this portable? maybe we need to exec $^X, $rlibperl, -S, @ARGV
exec($perl, '-S', @ARGV);
die "Failed to execute '$perl': $!";
__END__
=pod
=for :stopwords Randy Stauner ACKNOWLEDGEMENTS
=encoding utf-8
=head1 NAME
rbinperl - Execute perl using relative lib and assuming -S
=head1 VERSION
version 0.400
=head1 SEE ALSO
=over 4
=item *
L<App::rbinperl> for documentation
=item *
L<App::rlibperl> used to discover relative lib directories
=back
=head1 AUTHOR
Randy Stauner <rwstauner@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Randy Stauner.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut