[libmixin-extrafields-param-perl] 04/25: use Sub::Install to import

Florian Schlichting fsfs at moszumanska.debian.org
Wed Jan 29 21:00:22 UTC 2014


This is an automated email from the git hooks/post-receive script.

fsfs pushed a commit to annotated tag 0.001
in repository libmixin-extrafields-param-perl.

commit 23b899aed2a67239ca9fb1e39ece4a88d12a10ef
Author: Ricardo SIGNES <rjbs at codesimply.com>
Date:   Thu Dec 22 21:23:26 2005 +0000

    use Sub::Install to import
---
 lib/Does/Param.pm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/lib/Does/Param.pm b/lib/Does/Param.pm
index 4ec256e..7767620 100644
--- a/lib/Does/Param.pm
+++ b/lib/Does/Param.pm
@@ -6,6 +6,7 @@ use strict;
 use Carp ();
 use Exporter qw(import);
 use Scalar::Util ();
+use Sub::Install ();
 use Tie::RefHash::Weak;
 
 our @EXPORT = our @EXPORT_OK = qw(param);
@@ -87,6 +88,18 @@ sub param {
   return wantarray ? @return : $return[0];
 }
 
+sub import {
+  my ($class, $import_as) = @_;
+  my $into = caller(0);
+  $import_as ||= 'param';
+
+  Sub::Install::install_sub({
+    code => \&param,
+    into => $into, 
+    as   => $import_as
+  });
+}
+
 =head1 AUTHOR
 
 Ricardo Signes, C<< <rjbs at cpan.org> >>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmixin-extrafields-param-perl.git



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