Adding new package for CPAN module Import::Into version 1.001000 into
devel/p5-Import-Into. Writing exporters is a pain. Some use Exporter, some use Sub::Exporter, some use Moose::Exporter, some use Exporter::Declare ... and some things are pragmas. If you want to re-export other things, you have to know which is which. Exporter subclasses provide export_to_level, but if they overrode their import method all bets are off. Sub::Exporter provides an into parameter but figuring out something used it isn't trivial. Pragmas need to have their import method called directly since they affect the current unit of compilation. It's ... annoying. However, there is an approach that actually works for all of these types.
This commit is contained in:
parent
95074b3b84
commit
4f64f86739
4 changed files with 55 additions and 0 deletions
14
devel/p5-Import-Into/DESCR
Normal file
14
devel/p5-Import-Into/DESCR
Normal file
|
@ -0,0 +1,14 @@
|
|||
Writing exporters is a pain. Some use Exporter, some use Sub::Exporter,
|
||||
some use Moose::Exporter, some use Exporter::Declare ... and some things
|
||||
are pragmas.
|
||||
|
||||
If you want to re-export other things, you have to know which is which.
|
||||
Exporter subclasses provide export_to_level, but if they overrode their
|
||||
import method all bets are off. Sub::Exporter provides an into parameter
|
||||
but figuring out something used it isn't trivial. Pragmas need to have
|
||||
their import method called directly since they affect the current unit
|
||||
of compilation.
|
||||
|
||||
It's ... annoying.
|
||||
|
||||
However, there is an approach that actually works for all of these types.
|
20
devel/p5-Import-Into/Makefile
Normal file
20
devel/p5-Import-Into/Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
# $NetBSD: Makefile,v 1.1 2012/10/19 07:47:13 sno Exp $
|
||||
#
|
||||
|
||||
DISTNAME= Import-Into-1.001000
|
||||
PKGNAME= p5-${DISTNAME}
|
||||
CATEGORIES= devel perl5
|
||||
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=../../authors/id/M/MS/MSTROUT/}
|
||||
|
||||
MAINTAINER= pkgsrc-users@NetBSD.org
|
||||
HOMEPAGE= http://search.cpan.org/dist/Import-Into/
|
||||
COMMENT= Perl5 module to import packages into other packages
|
||||
LICENSE= ${PERL5_LICENSE}
|
||||
|
||||
PKG_INSTALLATION_TYPES= overwrite pkgviews
|
||||
PKG_DESTDIR_SUPPORT= user-destdir
|
||||
|
||||
PERL5_PACKLIST= auto/Import/Into/.packlist
|
||||
|
||||
.include "../../lang/perl5/module.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
6
devel/p5-Import-Into/distinfo
Normal file
6
devel/p5-Import-Into/distinfo
Normal file
|
@ -0,0 +1,6 @@
|
|||
$NetBSD: distinfo,v 1.1 2012/10/19 07:47:13 sno Exp $
|
||||
|
||||
SHA1 (Import-Into-1.001000.tar.gz) = 327f195ddc6773497ee282e58546f5cb519dda5f
|
||||
RMD160 (Import-Into-1.001000.tar.gz) = 0340a94a5db295ab851346795d1e40abb1c97681
|
||||
Size (Import-Into-1.001000.tar.gz) = 4762 bytes
|
||||
SHA1 (patch-aa) = 6691d22c594497fadc0ae362f3b4ec67b61f8a2e
|
15
devel/p5-Import-Into/patches/patch-aa
Normal file
15
devel/p5-Import-Into/patches/patch-aa
Normal file
|
@ -0,0 +1,15 @@
|
|||
$NetBSD: patch-aa,v 1.1 2012/10/19 07:47:13 sno Exp $
|
||||
|
||||
# Fix irregular module name
|
||||
|
||||
--- Makefile.PL.orig 2012-05-03 20:14:06.000000000 +0000
|
||||
+++ Makefile.PL
|
||||
@@ -5,7 +5,7 @@ use ExtUtils::MakeMaker;
|
||||
(do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
|
||||
|
||||
WriteMakefile(
|
||||
- NAME => 'Import-Into',
|
||||
+ NAME => 'Import::Into',
|
||||
VERSION_FROM => 'lib/Import/Into.pm',
|
||||
PREREQ_PM => { },
|
||||
LICENSE => 'perl',
|
Loading…
Reference in a new issue