in reply to Re^2: useless Useless warning
in thread useless Useless warning
use strict; use warnings; BEGIN { package My::Guard; sub new {} } { my $sth; my $guard1 = My::Guard->new(sub { $sth->finish }); my $guard2 = My::Guard->new(sub { $guard1; }); }
>perl script.pl >
By the way, My::Guard already exists as ReleaseAction, Object::Destroyer, AtExit, Scope::Guard, Sub::ScopeFinalizer, etc.
|
|---|