Yitzchak Scott-Thoennes wrote:
The throw_ok { ... } syntax only works because the throw_ok sub exists
and has a prototype that specifies a subref is expected; if you don't
load Test::Exception by the time the throw_ok call is compiled, it
is parsed as an indirect object call of the "throw_ok" me
On Mon, Aug 15, 2005 at 05:58:23PM +0200, S?bastien Aperghis-Tramoni wrote:
> use strict;
> use Test::More tests => 2;
> use Test::Exception;
> use Net::Pcap;
>
> throws_ok(
> sub { Net::Pcap::lookupdev() },
> '/^Usage: Net::Pcap::lookupdev\(err\)/',
> "
Sébastien Aperghis-Tramoni wrote:
While rewriting Net::Pcap test suite, I quickly stumbled upon this
problem: it looks like Test::Exception can't catch croak() or die()
thrown from XS code.
[...]
Ok, I corrected a mistake (I was using dies_ok() instead of
throws_ok()), and reduced the probl
* Sébastien Aperghis-Tramoni wrote:
>While rewriting Net::Pcap test suite, I quickly stumbled upon this
>problem: it looks like Test::Exception can't catch croak() or die()
>thrown from XS code. Here is an example:
http://spo.sf.net uses Test::Exception and croak() and things seem to
work for me
Hello all,
I have posted this question on CPAN Forum but nobody answered, so I
also post it here in case someone has an idea.
While rewriting Net::Pcap test suite, I quickly stumbled upon this
problem: it looks like Test::Exception can't catch croak() or die()
thrown from XS code. Here is an