--- deliantra/Deliantra-Client/DC.pm 2009/01/11 03:19:47 1.201 +++ deliantra/Deliantra-Client/DC.pm 2009/01/11 22:11:23 1.202 @@ -36,20 +36,7 @@ use Storable (); # finally use Fcntl (); use JSON::XS qw(encode_json decode_json); - -=item guard { BLOCK } - -Returns an object that executes the given block as soon as it is destroyed. - -=cut - -sub guard(&) { - bless \(my $cb = $_[0]), "DC::Guard" -} - -sub DC::Guard::DESTROY { - ${$_[0]}->() -} +use Guard qw(guard); =item shorten $string[, $maxlength]