Skip Menu |
 

This queue is for tickets about the TryCatch CPAN distribution.

Report information
The Basics
Id: 82618
Status: open
Priority: 0/
Queue: TryCatch

People
Owner: Nobody in particular
Requestors: b3nm0nty [...] gmail.com
Cc:
AdminCc:

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



Subject: TryCatch leaks memory when used with MooseX::Declare
Download (untitled) / with headers
text/plain 375b
Distribution: TryCatch Version: 1.003000 Perl: 5, version 14, subversion 2 (v5.14.2) built for i686-linux-gnu- thread-multi-64int uname -a: Linux pineapple 3.2.0-35-generic-pae #55-Ubuntu SMP Wed Dec 5 18:04:39 UTC 2012 i686 i686 i386 GNU/Linux Description: The try block created by the distribution TryCatch traps references when used in combination with MooseX::Declare.
Subject: try_catch_test.pl
Download try_catch_test.pl
text/x-perl 977b
use strict; use warnings; use Devel::Refcount qw/refcount/; use MooseX::Declare; class FooEval { method bar () { eval { $self->baz; }; } method baz () { return 2 + 2; } }; class FooTryTiny { use Try::Tiny; method bar () { try { $self->baz; } catch { }; } method baz () { return 2 + 2; } }; class FooTryCatch { use TryCatch; method bar () { try { $self->baz; } catch ($err) { }; } method baz () { return 2 + 2; } }; my @classes = qw/FooTryCatch FooTryTiny FooEval/; foreach (@classes) { my $foo = $_->new; print "devel refcount pre-$_: " . refcount($foo) . "\n"; for (1 .. 5) { $foo->bar; } print "devel refcount post-$_: " . refcount($foo) . "\n\n"; } #devel refcount pre-FooTryCatch: 1 #devel refcount post-FooTryCatch: 6 # #devel refcount pre-FooTryTiny: 1 #devel refcount post-FooTryTiny: 1 # #devel refcount pre-FooEval: 1 #devel refcount post-FooEval: 1
Download (untitled) / with headers
text/plain 513b
On Thu Jan 10 11:15:31 2013, https://www.google.com/accounts/o8/id? id=AItOawnhaEJwRSda5kQS8I7dvg0Qq9Hok5J7Aqg wrote: Show quoted text
> Distribution: TryCatch > Version: 1.003000 > Perl: 5, version 14, subversion 2 (v5.14.2) built for i686-linux-gnu- > thread-multi-64int > uname -a: Linux pineapple 3.2.0-35-generic-pae #55-Ubuntu SMP Wed Dec 5 > 18:04:39 UTC 2012 i686 i686 i386 GNU/Linux > > Description: The try block created by the distribution TryCatch traps > references when used in combination with MooseX::Declare.
Subject: try_catch_test.txt
Download try_catch_test.txt
text/plain 977b
use strict; use warnings; use Devel::Refcount qw/refcount/; use MooseX::Declare; class FooEval { method bar () { eval { $self->baz; }; } method baz () { return 2 + 2; } }; class FooTryTiny { use Try::Tiny; method bar () { try { $self->baz; } catch { }; } method baz () { return 2 + 2; } }; class FooTryCatch { use TryCatch; method bar () { try { $self->baz; } catch ($err) { }; } method baz () { return 2 + 2; } }; my @classes = qw/FooTryCatch FooTryTiny FooEval/; foreach (@classes) { my $foo = $_->new; print "devel refcount pre-$_: " . refcount($foo) . "\n"; for (1 .. 5) { $foo->bar; } print "devel refcount post-$_: " . refcount($foo) . "\n\n"; } #devel refcount pre-FooTryCatch: 1 #devel refcount post-FooTryCatch: 6 # #devel refcount pre-FooTryTiny: 1 #devel refcount post-FooTryTiny: 1 # #devel refcount pre-FooEval: 1 #devel refcount post-FooEval: 1


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.