FAQ
Hi. Is there a way to pass extra command-line arguments to a test script running in Apache::Test?

I want to do:

   t/TEST -verbose t/foobar.t --baz

And have this argument show up in @ARGV of t/foobar.t. Is there a special trick?

Or, this would work:

   BAZ=1 t/TEST -verbose t/foobar.t

And have that show up in $ENV in t/foobar.t.

The only way I have found so far is to put files somewhere for the script to read. That seems a little kludgy.

Any tips? Thank you.

Mark

Search Discussions

  • Mark Hedges at Jul 25, 2014 at 10:55 pm
    Hey nevermind, setting env vars works. I guess I must have typed that wrong before when I tried that. Thank you.

    Mark

    -----Original Message-----
    From: Mark Hedges
    Sent: Friday, July 25, 2014 3:46 PM
    To: modperl@perl.apache.org
    Cc: Mark Hedges
    Subject: pass extra args to a test in Apache::Test?

    Hi. Is there a way to pass extra command-line arguments to a test script running in Apache::Test?

    I want to do:

       t/TEST -verbose t/foobar.t --baz

    And have this argument show up in @ARGV of t/foobar.t. Is there a special trick?

    Or, this would work:

       BAZ=1 t/TEST -verbose t/foobar.t

    And have that show up in $ENV in t/foobar.t.

    The only way I have found so far is to put files somewhere for the script to read. That seems a little kludgy.

    Any tips? Thank you.

    Mark

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmodperl @
categoriesmodperl, perl
postedJul 25, '14 at 10:46p
activeJul 25, '14 at 10:55p
posts2
users1
websiteperl.apache.org

1 user in discussion

Mark Hedges: 2 posts

People

Translate

site design / logo © 2018 Grokbase