]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blobdiff - lib/Test/Valgrind/Session.pm
Bump copyright year
[perl/modules/Test-Valgrind.git] / lib / Test / Valgrind / Session.pm
index 81f195654edd8cf5fd6d93716d11ca8d5232b5e9..6c2a16c3fd2f190b957708769d9e886d0b325c23 100644 (file)
@@ -177,7 +177,7 @@ sub run {
  my %args = @_;
 
  $self->start(%args);
- my $guard = bless sub { $self->finish } => 'Test::Valgrind::Session::Guard';
+ my $guard = Test::Valgrind::Session::Guard->new(sub { $self->finish });
 
  $self->_run($args{command});
 }
@@ -271,7 +271,9 @@ sub _run {
  return;
 }
 
-sub Test::Valgrind::Session::Guard::DESTROY { $_[0]->() }
+sub Test::Valgrind::Session::Guard::new     { bless \($_[1]), $_[0] }
+
+sub Test::Valgrind::Session::Guard::DESTROY { ${$_[0]}->() }
 
 =head2 C<action>
 
@@ -491,7 +493,7 @@ You can find documentation for this module with the perldoc command.
 
 =head1 COPYRIGHT & LICENSE
 
-Copyright 2009 Vincent Pit, all rights reserved.
+Copyright 2009,2010 Vincent Pit, all rights reserved.
 
 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.