From: Karen Etheridge Date: Sun, 12 Oct 2014 19:32:54 +0000 (-0700) Subject: ':all' export tag X-Git-Tag: v1.002005~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bf8dbbe1dfd8b11f39ed84ce5db0311ae5e40617;p=p5sagit%2FJSON-MaybeXS.git ':all' export tag --- diff --git a/Changes b/Changes index 37f06fa..3ae0239 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ Revision history for JSON-MaybeXS - fix "can I haz XS?" logic precedence in Makefile.PL + - added the ':all' export tag 1.002004 - 2014-10-11 - support use of PUREPERL_ONLY in Makefile.PL to avoid adding an XS diff --git a/lib/JSON/MaybeXS.pm b/lib/JSON/MaybeXS.pm index 7b0f64e..7f8d357 100644 --- a/lib/JSON/MaybeXS.pm +++ b/lib/JSON/MaybeXS.pm @@ -32,6 +32,7 @@ BEGIN { our @EXPORT = qw(encode_json decode_json JSON); our @EXPORT_OK = qw(is_bool); +our %EXPORT_TAGS = ( all => [ @EXPORT, @EXPORT_OK ] ); sub JSON () { our $JSON_Class } @@ -96,6 +97,10 @@ To import only some symbols, specify them on the C line: use JSON::MaybeXS qw(JSON); # JSON constant only +To import all available symbols, use C<:all>: + + use JSON::MaybeXS ':all'; + =head2 encode_json This is the C function provided by the selected implementation