in reply to Test::MockModule question

Don't use indirect object syntax. Not only is it buggy, I have personally found myself making other typos when I do that. In this case:

  new Test->MockModule('Bar');

Should be:

Test::MockModule->new('Bar'); # or if you really like the buggy indirect object syntax: new Test::MockModule 'Bar';

Cheers,
Ovid

New address of my CGI Course.

Replies are listed 'Best First'.
Re^2: Test::MockModule question
by thor (Priest) on Sep 15, 2005 at 17:56 UTC
    I typically don't either, but I was just following the script's documentation. I figure that the module author would probably know their module the best. :)

    thor

    Feel the white light, the light within
    Be your own disciple, fan the sparks of will
    For all of us waiting, your kingdom will come

      Aack! You're right. It is documented that way. That's a shame. I thought all serious Perl hackers knew indirect object syntax was bad form by now and the author of that module is a good enough hacker that he should know better :)

      Cheers,
      Ovid

      New address of my CGI Course.