r3145 - in /packages/libsub-exporter-perl/branches/upstream/current: Changes META.yml lib/Sub/Exporter.pm lib/Sub/Exporter/Tutorial.pod

eloy at users.alioth.debian.org eloy at users.alioth.debian.org
Wed Jun 21 08:10:23 UTC 2006


Author: eloy
Date: Wed Jun 21 08:10:20 2006
New Revision: 3145

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=3145
Log:
Load /tmp/tmp.AxXam30556/libsub-exporter-perl-0.96.6 into
packages/libsub-exporter-perl/branches/upstream/current.

Modified:
    packages/libsub-exporter-perl/branches/upstream/current/Changes
    packages/libsub-exporter-perl/branches/upstream/current/META.yml
    packages/libsub-exporter-perl/branches/upstream/current/lib/Sub/Exporter.pm
    packages/libsub-exporter-perl/branches/upstream/current/lib/Sub/Exporter/Tutorial.pod

Modified: packages/libsub-exporter-perl/branches/upstream/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libsub-exporter-perl/branches/upstream/current/Changes?rev=3145&op=diff
==============================================================================
--- packages/libsub-exporter-perl/branches/upstream/current/Changes (original)
+++ packages/libsub-exporter-perl/branches/upstream/current/Changes Wed Jun 21 08:10:20 2006
@@ -1,4 +1,9 @@
 Revision history for Sub-Exporter
+
+0.966   2006-06-17
+        correct documentation of collector hook args
+        simplify internal use of setup_exporter
+        clean up documentation in ::Util
 
 0.965   2006-06-05
         curry_class now allows the export to curry a differently-named method

Modified: packages/libsub-exporter-perl/branches/upstream/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libsub-exporter-perl/branches/upstream/current/META.yml?rev=3145&op=diff
==============================================================================
--- packages/libsub-exporter-perl/branches/upstream/current/META.yml (original)
+++ packages/libsub-exporter-perl/branches/upstream/current/META.yml Wed Jun 21 08:10:20 2006
@@ -11,4 +11,4 @@
   Data::OptList: 0.1
   Params::Util: 0.14
   Sub::Install: 0.92
-version: 0.965
+version: 0.966

Modified: packages/libsub-exporter-perl/branches/upstream/current/lib/Sub/Exporter.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libsub-exporter-perl/branches/upstream/current/lib/Sub/Exporter.pm?rev=3145&op=diff
==============================================================================
--- packages/libsub-exporter-perl/branches/upstream/current/lib/Sub/Exporter.pm (original)
+++ packages/libsub-exporter-perl/branches/upstream/current/lib/Sub/Exporter.pm Wed Jun 21 08:10:20 2006
@@ -14,13 +14,13 @@
 
 =head1 VERSION
 
-version 0.965
-
-  $Id: /my/cs/projects/export/trunk/lib/Sub/Exporter.pm 22106 2006-06-05T14:19:07.111533Z rjbs  $
+version 0.966
+
+  $Id: /my/cs/projects/export/trunk/lib/Sub/Exporter.pm 22590 2006-06-17T19:54:13.510080Z rjbs  $
 
 =cut
 
-our $VERSION = '0.965';
+our $VERSION = '0.966';
 
 =head1 SYNOPSIS
 
@@ -314,17 +314,16 @@
   collectors => { defaults => sub { return (exists $_[0]->{data}) ? 0 : 1 } }
 
 Collector coderefs can also be used as hooks to perform arbitrary actions
-before anything is exported.  B<Warning!>  This feature is experimental and may
-change in the future.
-
-When the coderef is called, it is actually passed these values:
-
-  $value - the value given for the collector in the args to import
-  $name  - the name of the collector
- \%config      - the exporter configuration
- \@import_args - the arguments passed to the exporter, sans collections
-  $class - the package on which the importer was called
-  $into  - the package into which exports will be exported
+before anything is exported.
+
+When the coderef is called, it is passed the value of the collection and a
+hashref containing the following entries:
+
+  name        - the name of the collector
+  config      - the exporter configuration (hashref)
+  import_args - the arguments passed to the exporter, sans collections (aref)
+  class       - the package on which the importer was called
+  into        - the package into which exports will be exported
 
 =head1 CALLING THE EXPORTER
 
@@ -714,6 +713,9 @@
 sub _generate {
   my ($class, $generator, $name, $arg, $collection) = @_;
 
+  # I considered making the T case, below, "$class->$generator(" but it seems
+  # that overloading precedence would turn an overloaded-as-code generator
+  # object into a string before code. -- rjbs, 2006-06-11
   my $code = $generator
            ? $generator->($class, $name, $arg, $collection)
            : $class->can($name); 
@@ -744,7 +746,7 @@
 setup_exporter({
   exports => [
     qw(setup_exporter build_exporter),
-    _import => sub { splice @_, 0, 2; build_exporter(@_) },
+    _import => sub { build_exporter($_[2]) },
   ],
   groups  => {
     all   => [ qw(setup_exporter build_export) ],

Modified: packages/libsub-exporter-perl/branches/upstream/current/lib/Sub/Exporter/Tutorial.pod
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libsub-exporter-perl/branches/upstream/current/lib/Sub/Exporter/Tutorial.pod?rev=3145&op=diff
==============================================================================
--- packages/libsub-exporter-perl/branches/upstream/current/lib/Sub/Exporter/Tutorial.pod (original)
+++ packages/libsub-exporter-perl/branches/upstream/current/lib/Sub/Exporter/Tutorial.pod Wed Jun 21 08:10:20 2006
@@ -5,7 +5,7 @@
 
 =head1 VERSION
 
-  $Id: /my/cs/projects/export/trunk/lib/Sub/Exporter/Tutorial.pod 4346 2006-03-13T16:52:54.640185Z rjbs  $
+  $Id: /my/cs/projects/export/trunk/lib/Sub/Exporter/Tutorial.pod 22376 2006-06-11T15:02:24.373468Z rjbs  $
 
 =head1 DESCRIPTION
 
@@ -249,45 +249,9 @@
 
 =head1 SEE ALSO
 
-There are a whole mess of exporters on the CPAN.  Here's a quick summary:
-
 =over
 
-=item * L<Exporter> and co.
-
-This is the standard Perl exporter.  Its interface is a little clunky, but it's
-fast and ubiquitous.  It can do some things that Sub::Exporter can't.  It can
-export things other than routines, it can import "everything in this group
-except this symbol," and some other more esoteric things.
-
-It always exports things exactly as they appear in the exporting module; it
-can't rename or customize routines.  Its groups ("tags") can't be nested.
-
-L<Exporter::Lite> is a whole lot like Exporter, but it does significantly less.
-
-L<Exporter::Easy> provides a wrapper around the standard Exporter.
-
-=item * Attribute-Based Exporters
-
-Some exporters use attributes to mark variables to export.  L<Exporter::Simple>
-supports exporting any kind of symbol, and supports groups.
-
-L<Perl6::Export> isn't actually attribute based, but looks similar.  Its syntax
-is borrowed from Perl 6, and implemented by a source filter.
-
-=item * Other Exporters
-
-L<Exporter::Renaming> wraps the standard Exporter to allow it to export symbols
-with changed names.
-
-L<Class::Exporter> performs a special kind of routine generation, giving each
-importing package an instance of your class, and then exporting the instance's
-methods as normal routines.  (Sub::Exporter, of course, can easily emulate this
-behavior.)
-
-L<Exporter::Tidy> implements a form of renaming (using its C<_map> argument)
-and of prefixing, and implements groups.  It also avoids using package
-variables for its configuration.
+=item * L<Sub::Exporter> for complete documentation and references to other exporters.
 
 =back
 




More information about the Pkg-perl-cvs-commits mailing list