Skip Menu |

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

Report information
The Basics
Id: 7974
Status: resolved
Priority: 0/
Queue: Test-Memory-Cycle

People
Owner: Nobody in particular
Requestors: jm-rt [...] jmason.org
Cc:
AdminCc:

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



Subject: impossible to use without Test::More
hi there -- Test::Memory::Cycle seems like a useful tool to add to the Mail::SpamAssassin test suite. however, we're still using Test, rather than Test::More, due to backwards compatibility with perl 5.6.1. It seems Test::Memory::Cycle hooks heavily into the latter, and as far as I can see it's basically impossible (without some nasty kludging) to use unless we also make Test::More a requirement; I can't even *check* to see if Test::More is installed without making a mess ;) e.g.: my $NUMTESTS = 3; my $HAVE_TEST_MEM_CYCLE; { local $SIG{__DIE__} = 'warn'; open (OLD, ">&STDOUT"); open (STDOUT, ">log/stdout"); eval ' use Test::More tests => $NUMTESTS; use Test::Memory::Cycle; '; $HAVE_TEST_MEM_CYCLE = !(defined($@) && $@ ne ''); open (STDOUT, ">&OLD"); close OLD; } unless ($HAVE_TEST_MEM_CYCLE) { print "1..0\n"; print "# Test::Memory::Cycle required for this test, skipped\n"; exit 0; END { $? = 0; } # Test::Builder screws us around otherwise } # otherwise, we do have those modules and we can carry on that's as far as I got before I gave up. it appears there's more stuff I'd need to hook my way around before it could work, and that much wierd kludge code isn't the sort of thing we'd want to put in our "t" -- given the wierd platforms people install SpamAssassin on ;) Any chance you could consider a use qw() flag that would stop Test::Memory::Cycle hooking so heavily into Test::More?
Show quoted text
> Any chance you could consider a use qw() flag that would stop > Test::Memory::Cycle hooking so heavily into Test::More?
Is it Test::More, or Test::Builder in general that is the bummer?
I hope you've found a way to use Test::Memory::Cycle. I'm closing this ticket.