From: Nicholas Clark Date: Fri, 15 Apr 2011 12:43:23 +0000 (+0100) Subject: Simplify the setup code in Size.pm X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=43be4c6346e89c3a62364c4d01e84e03f6094233;p=p5sagit%2FDevel-Size.git Simplify the setup code in Size.pm We don't use @EXPORT, so don't mention it. As the only tag is :all, declare @EXPORT_OK first, and define %EXPORT_TAGS in terms of it. --- diff --git a/lib/Devel/Size.pm b/lib/Devel/Size.pm index c71f1e2..2d3491e 100644 --- a/lib/Devel/Size.pm +++ b/lib/Devel/Size.pm @@ -1,7 +1,7 @@ package Devel::Size; use strict; -use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $warn $dangle); +use vars qw($VERSION @ISA @EXPORT_OK %EXPORT_TAGS $warn $dangle); require 5.008; require Exporter; @@ -9,14 +9,11 @@ require XSLoader; @ISA = qw(Exporter); -# This allows declaration use Devel::Size ':all'; -%EXPORT_TAGS = ( 'all' => [ qw( - size total_size -) ] ); +@EXPORT_OK = qw(size total_size); -@EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); +# This allows declaration use Devel::Size ':all'; +%EXPORT_TAGS = ( 'all' => \@EXPORT_OK ); -@EXPORT = qw( ); $VERSION = '0.72_52'; XSLoader::load( __PACKAGE__);