$^X is simpler, and simpler solutions are preferable.
Can it be wrong?

cmac


On Feb 17, 2010, at 4:02 AM, David Cantrell wrote:

On Tue, Feb 16, 2010 at 06:47:25PM -0800, cr...@animalhead.com wrote:

So I would like to add some tests to one of my test files,
involving something like `perl -c scripts/my_script`, and
fail if there's an error.

My question is: where under M::B can I get the path to the
perl under which Build.PL was run?  I could not find this in
the various documentation pages.

M::B should invoke your test file with the correct perl.  So in that
file you can do, eg, ...

  use Config;
  my $perl = $Config{perlpath}
  system($perl, 'myscript', @args_for_my_script);

If you're unsure about whether it's Doing The Right Thing, then you can upload a dev version (you mark developer-only versions of distributions
by putting an underscore in the version, eg My-Dist-0.40_94.tar.gz) to
the CPAN.  Real users won't see it, but the CPAN-testers will.

--
David Cantrell | Nth greatest programmer in the world

Lesbian bigots try to put finger in linguistic dyke:
  http://news.bbc.co.uk/1/hi/world/europe/7376919.stm

Reply via email to