]> git.donarmstrong.com Git - debbugs.git/commitdiff
support export tags
authorDon Armstrong <don@donarmstrong.com>
Mon, 9 Jul 2012 19:21:44 +0000 (12:21 -0700)
committerDon Armstrong <don@donarmstrong.com>
Mon, 9 Jul 2012 19:21:44 +0000 (12:21 -0700)
Debbugs/MIME.pm

index 05534e3e054c47d2cb281f683aaacf1a0ac7a52e..f9b58c9093d9836d942f7a4bd79dc961e513588d 100644 (file)
@@ -31,12 +31,21 @@ use warnings;
 use strict;
 
 use base qw(Exporter);
-use vars qw($VERSION @EXPORT_OK);
+use vars qw($VERSION @EXPORT_OK %EXPORT_TAGS @EXPORT);
 
 BEGIN {
     $VERSION = 1.00;
+    $DEBUG = 0 unless defined $DEBUG;
 
-    @EXPORT_OK = qw(parse decode_rfc1522 encode_rfc1522 convert_to_utf8 create_mime_message getmailbody);
+    @EXPORT = ();
+
+    %EXPORT_TAGS = (mime => qw(parse create_mime_message getmailbody),
+                   rfc1522 => qw(decode_rfc1522 encode_rfc522),
+                   utf8 => qw(convert_to_utf8),
+                  );
+    @EXPORT_OK=();
+    Exporter::export_ok_tags(keys %EXPORT_TAGS);
+    $EXPORT_TAGS{all} = [@EXPORT_OK];
 }
 
 use File::Path;