Permalink
Browse files

Checking in changes prior to tagging of version 0.02.

Changelog diff is:

diff --git a/Changes b/Changes
index efca895..eaab729 100644
--- a/Changes
+++ b/Changes
@@ -1,4 +1,8 @@
 Revision history for Perl extension Exporter::Auto

+0.02 2013-02-08T08:18:52
+
+    - doc improvements
+
 0.01    Sat Oct 29 11:25:29 2011
     - original version
  • Loading branch information...
1 parent c785865 commit b16968ecc23cc18ee1917e8a568616d7c97a88f7 @tokuhirom committed Feb 7, 2013
Showing with 79 additions and 6 deletions.
  1. +2 −0 .shipit
  2. +4 −0 Changes
  3. +4 −4 LICENSE
  4. +0 −1 README.pod
  5. +68 −0 README.pod
  6. +1 −1 lib/Exporter/Auto.pm
View
@@ -0,0 +1,2 @@
+steps = FindVersion, ChangeAllVersions, CheckChangeLog, DistTest, Commit, Tag, MakeDist, UploadCPAN
+git.push_to=origin
View
@@ -1,4 +1,8 @@
Revision history for Perl extension Exporter::Auto
+0.02 2013-02-08T08:18:52
+
+ - doc improvements
+
0.01 Sat Oct 29 11:25:29 2011
- original version
View
@@ -1,4 +1,4 @@
-This software is copyright (c) 2011 by Tokuhiro Matsuno E<lt>tokuhirom AAJKLFJEF@ GMAIL COME<gt>.
+This software is copyright (c) 2013 by Tokuhiro Matsuno E<lt>tokuhirom AAJKLFJEF@ GMAIL COME<gt>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
@@ -12,7 +12,7 @@ b) the "Artistic License"
--- The GNU General Public License, Version 1, February 1989 ---
-This software is Copyright (c) 2011 by Tokuhiro Matsuno E<lt>tokuhirom AAJKLFJEF@ GMAIL COME<gt>.
+This software is Copyright (c) 2013 by Tokuhiro Matsuno E<lt>tokuhirom AAJKLFJEF@ GMAIL COME<gt>.
This is free software, licensed under:
@@ -22,7 +22,7 @@ This is free software, licensed under:
Version 1, February 1989
Copyright (C) 1989 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -272,7 +272,7 @@ That's all there is to it!
--- The Artistic License 1.0 ---
-This software is Copyright (c) 2011 by Tokuhiro Matsuno E<lt>tokuhirom AAJKLFJEF@ GMAIL COME<gt>.
+This software is Copyright (c) 2013 by Tokuhiro Matsuno E<lt>tokuhirom AAJKLFJEF@ GMAIL COME<gt>.
This is free software, licensed under:
View
View
@@ -0,0 +1,68 @@
+package Exporter::Auto;
+use strict;
+use warnings;
+use 5.008005;
+our $VERSION = '0.02';
+
+use Sub::Identify qw(stash_name);
+use B::Hooks::EndOfScope;
+use Exporter;
+
+sub import {
+ my $klass = caller(0);
+
+ no strict 'refs';
+ unshift @{"${klass}::ISA"}, 'Exporter';
+
+ on_scope_end {
+ while (my ($k, $v) = each %{"${klass}::"}) {
+ next if $k =~ /^(?:BEGIN|CHECK|END)$/;
+ next if $k =~ /^_/;
+ next unless *{"${klass}::${k}"}{CODE};
+ next if $klass ne stash_name($klass->can($k));
+ push @{"${klass}::EXPORT"}, $k;
+ }
+ };
+}
+
+1;
+__END__
+
+=encoding utf8
+
+=head1 NAME
+
+Exporter::Auto - Export public functions automatically.
+
+=head1 SYNOPSIS
+
+ package Foo;
+ use Exporter::Auto;
+
+ sub foo { }
+
+ package main;
+ use Foo;
+ foo(); # <= this function was exported!
+
+=head1 DESCRIPTION
+
+I'm tired to push function names to @EXPORT. Perl5 should add functions automatically!!!111
+
+=head1 AUTHOR
+
+Tokuhiro Matsuno E<lt>tokuhirom AAJKLFJEF@ GMAIL COME<gt>
+
+=head1 SEE ALSO
+
+This module uses magical L<B::Hooks::EndOfScope>.
+If you think this module is too clever, please try L<Module::Functions> instead.
+
+=head1 LICENSE
+
+Copyright (C) Tokuhiro Matsuno <TOKUHIROM @ GMAIL COM
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
@@ -2,7 +2,7 @@ package Exporter::Auto;
use strict;
use warnings;
use 5.008005;
-our $VERSION = '0.01';
+our $VERSION = '0.02';
use Sub::Identify qw(stash_name);
use B::Hooks::EndOfScope;

0 comments on commit b16968e

Please sign in to comment.