Skip Menu |

This queue is for tickets about the Test-LeakTrace CPAN distribution.

Report information
The Basics
Id: 69531
Status: resolved
Priority: 0/
Queue: Test-LeakTrace

People
Owner: Nobody in particular
Requestors: justincase [...] yopmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: loading Test::LeakTrace in a string eval doesn't work
the following test script fails using a common (and recommended) idiom of loading a module in a string eval. to get this to work, one must load Test::LeakTrace again outside the eval. #!perl -w use strict; use warnings; use Test::More; eval "use Test::LeakTrace; 1"; if ($@) { plan skip_all => "Test::LeakTrace isn't installed"; } plan tests => 1; leaks_cmp_ok { my $a = 1; } '<', 1;
Hi, This module uses prototypes, so you must import functions in BEGIN blocks. Or, consider Test::Requires. -- Goro Fuji (gfx) GFUJI at CPAN.org