in reply to Re: Using Test::TAP::Model and a global object
in thread Using Test::TAP::Model and a global object

Hi steve, thanks for your reply

Not sure if I made this clear, but I need to pass the same object because it contains connections (SSH and LDAP) that I want to re-use without re-connecting in every test script.

  • Comment on Re^2: Using Test::TAP::Model and a global object

Replies are listed 'Best First'.
Re^3: Using Test::TAP::Model and a global object
by skx (Parson) on Oct 16, 2007 at 10:33 UTC

    Ahh I guess I wasn't being helpful then.

    I guess a potential fall-back plan would be to created a local singleton module to encapsulate your connection.

    Then each test could do something like:

    my $con = Singleton::Connection->instance();

    and this way only the first connection would connect - the latter calls would return the established object.

    Still just a hack instead of the real ability you want, but it might help.

    Steve
    --