diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/Makefile /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/Makefile --- /usr/ports/devel/p5-Test-Module-Used/Makefile 2010-01-15 01:37:31.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/Makefile 2010-02-03 10:44:42.000000000 +0900 @@ -6,7 +6,7 @@ # PORTNAME= Test-Module-Used -PORTVERSION= 0.1.8 +PORTVERSION= 0.1.9 CATEGORIES= devel perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/distinfo /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/distinfo --- /usr/ports/devel/p5-Test-Module-Used/distinfo 2010-01-15 01:37:31.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/distinfo 2010-02-03 22:40:58.000000000 +0900 @@ -1,3 +1,3 @@ -MD5 (Test-Module-Used-0.1.8.tar.gz) = 4fe2c075f39832e15cfecbde06dd38c0 -SHA256 (Test-Module-Used-0.1.8.tar.gz) = 91d31fa0cfa053f816f4ca49eee0ddfeff2ae98d86184e8717d1d9e887cbd0b2 -SIZE (Test-Module-Used-0.1.8.tar.gz) = 20781 +MD5 (Test-Module-Used-0.1.9.tar.gz) = b8dde9e0e427e01cefe89b3491792ebd +SHA256 (Test-Module-Used-0.1.9.tar.gz) = 58d3926006f0b756a0f9ff3379a87f28cf2ed8988a8c0e944643623249e24487 +SIZE (Test-Module-Used-0.1.9.tar.gz) = 20867 diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/.PLIST.flattened /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/.PLIST.flattened --- /usr/ports/devel/p5-Test-Module-Used/work/.PLIST.flattened 2010-01-15 12:52:06.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/.PLIST.flattened 1970-01-01 09:00:00.000000000 +0900 @@ -1,3 +0,0 @@ -/usr/local/lib/perl5/5.10.1/man/man3/Test::Module::Used.3.gz -/usr/local/lib/perl5/site_perl/5.10.1/Test/Module/Used.pm -/usr/local/lib/perl5/site_perl/5.10.1/mach/auto/Test/Module/Used/.packlist diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/.PLIST.mktmp /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/.PLIST.mktmp --- /usr/ports/devel/p5-Test-Module-Used/work/.PLIST.mktmp 2010-01-15 12:51:55.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/.PLIST.mktmp 1970-01-01 09:00:00.000000000 +0900 @@ -1,7 +0,0 @@ -lib/perl5/5.10.1/man/man3/Test::Module::Used.3.gz -@unexec rm -f %D/lib/perl5/5.10.1/man/cat3/Test::Module::Used.3.gz %D/lib/perl5/5.10.1/man/cat3/Test::Module::Used.3 %D/lib/perl5/5.10.1/man/cat3/Test::Module::Used.3.gz %D/lib/perl5/5.10.1/man/cat3/Test::Module::Used.3.gz.gz %D/lib/perl5/5.10.1/man/cat3/Test::Module::Used.3.gz.bz2 -lib/perl5/site_perl/5.10.1/Test/Module/Used.pm -lib/perl5/site_perl/5.10.1/mach/auto/Test/Module/Used/.packlist -@dirrm lib/perl5/site_perl/5.10.1/mach/auto/Test/Module/Used -@unexec rmdir %D/lib/perl5/site_perl/5.10.1/mach/auto/Test/Module 2>/dev/null || true -@unexec rmdir %D/lib/perl5/site_perl/5.10.1/Test/Module 2>/dev/null || true diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/ChangeLog /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/ChangeLog --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/ChangeLog 2010-01-12 16:11:11.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/ChangeLog 1970-01-01 09:00:00.000000000 +0900 @@ -1,106 +0,0 @@ -2010-01-12 Takuya Tsuchida - - * 0.1.8 - remove executable permission in Makefile.PL - -2010-01-03 Takuya Tsuchida - * 0.1.7 - add repository in Makefile.PL - (merge from git://github.com/cpanservice/Test-Module-Used.git) - - * 0.1.6 - fix: add copyright information(for RT#53290) - -2009-12-30 Takuya Tsuchida - - * 0.1.5 - fix: insufficient version of version.pm specified. - -2009-12-25 Takuya Tsuchida - - * 0.1.4 - improve error messages when test fails. - -2009-12-24 Takuya Tsuchida - - * 0.1.3_02 - fix: POD structure(chaptering) is insufficient. - - -2009-12-24 Takuya Tsuchida - - * 0.1.3_01 - deprecated parameters are deleted - read perl version from META.yml and NOT from *.pm - -2009-12-09 Takuya Tsuchida - - * 0.1.2 - add parameter 'test_lib_dir' in constructor - and automatically push exclude_in_testdir to modules which are in - test_lib_dir. - -2009-12-07 Takuya Tsuchida - - * 0.1.1 - fix: failed if package statement doesn't exist in *.pm file. - -2009-12-07 Takuya Tsuchida - - * 0.1.0 - fix: fix again test failed in windows environment - remove all slash directory separator, and instead of using catfile(). - -2009-12-04 Takuya Tsuchida - - * 0.0.9 - fix: test failed in windows environment - -2009-12-02 Takuya Tsuchida - - * 0.0.8 - implement push_exclude_in_{test,module}dir(), it enables - set exclude_in_{test,module}dir after new() - -2009-12-01 Takuya Tsuchida - - * 0.0.7 - fix: bugs in version fetching from file. - -2009-11-29 Takuya Tsuchida - - * 0.0.6 - refactoring methods and some optimization - find bug in handling core module - -2009-11-28 Takuya Tsuchida - - * 0.0.5 - fix: test faild in windows environment - -2009-11-27 Takuya Tsuchida - - * 0.0.4 - found bug in ok(module_requires exclude) - add build_requires and requires exclusion in constructor - - -2009-11-24 Takuya Tsuchida - - * 0.0.3 - add ChangeLog and README - describe about perl_version - bug fix (failed when test is empty) - parse perlversion using Perl::MinimumVersion - -2009-11-23 Takuya Tsuchida - - * 0.0.2 - fix insufficient index(set no_index to testdata) - - -2009-11-22 Takuya Tsuchida - - * 0.0.1 - initial release - diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/MANIFEST /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/MANIFEST --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/MANIFEST 2009-12-09 18:53:32.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/MANIFEST 1970-01-01 09:00:00.000000000 +0900 @@ -1,33 +0,0 @@ -ChangeLog -inc/Module/Install.pm -inc/Module/Install/AuthorTests.pm -inc/Module/Install/Base.pm -inc/Module/Install/Can.pm -inc/Module/Install/Fetch.pm -inc/Module/Install/Makefile.pm -inc/Module/Install/Metadata.pm -inc/Module/Install/Win32.pm -inc/Module/Install/WriteAll.pm -lib/Test/Module/Used.pm -Makefile.PL -MANIFEST This list of files -META.yml -README -t/001_use_ok.t -t/002_default.t -t/003_option.t -t/004_used_ok.t -t/005_used_module.t -t/006_read_meta_yml.t -t/007_test_myself.t -t/008_test_is_empty.t -t/009_auto_get_exclude.t -t/010_test_myself2.t -testdata/lib/SampleModule.pm -testdata/lib2/My/Test.pm -testdata/META.yml -testdata/META.yml2 -testdata/META.yml3 -testdata/t/001_test.t -testdata/t2/001_use_ok.t -testdata/t2/lib/My/Test2.pm diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/META.yml /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/META.yml --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/META.yml 2010-01-12 16:28:21.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/META.yml 1970-01-01 09:00:00.000000000 +0900 @@ -1,34 +0,0 @@ ---- -abstract: 'Test required module is really used and vice versa bitween lib/t and META.yml' -author: - - 'Takuya Tsuchida tsucchi@cpan.org' -build_requires: - ExtUtils::MakeMaker: 6.42 - Test::More: 0 -configure_requires: - ExtUtils::MakeMaker: 6.42 -distribution_type: module -generated_by: 'Module::Install version 0.91' -license: perl -meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 -name: Test-Module-Used -no_index: - directory: - - inc - - t - - testdata - - xt -requires: - List::MoreUtils: 0 - Module::CoreList: 0 - Module::Used: 0 - PPI::Document: 0 - YAML: 0 - perl: 5.8.0 - version: 0.77 -resources: - license: http://dev.perl.org/licenses/ - repository: http://github.com/tsucchi/Test-Module-Used -version: 0.1.8 diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/Makefile /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/Makefile --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/Makefile 2010-01-15 12:51:49.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/Makefile 1970-01-01 09:00:00.000000000 +0900 @@ -1,809 +0,0 @@ -# This Makefile is for the Test::Module::Used extension to perl. -# -# It was generated automatically by MakeMaker version -# 6.55_02 (Revision: 65502) from the contents of -# Makefile.PL. Don't edit this file, edit Makefile.PL instead. -# -# ANY CHANGES MADE HERE WILL BE LOST! -# -# MakeMaker ARGV: (q[INSTALLDIRS=site], q[CC=cc], q[CCFLAGS=-O2 -pipe -fno-strict-aliasing], q[PREFIX=/usr/local], q[INSTALLPRIVLIB=/usr/local/lib], q[INSTALLARCHLIB=/usr/local/lib]) -# - -# MakeMaker Parameters: - -# ABSTRACT => q[Test required module is really used and vice versa bitween lib/t and META.yml] -# AUTHOR => q[Takuya Tsuchida tsucchi@cpan.org] -# BUILD_REQUIRES => { } -# DIR => [] -# DISTNAME => q[Test-Module-Used] -# NAME => q[Test::Module::Used] -# NO_META => q[1] -# PL_FILES => { } -# PREREQ_PM => { YAML=>q[0], Module::Used=>q[0], ExtUtils::MakeMaker=>q[6.42], version=>q[0.77], Test::More=>q[0], PPI::Document=>q[0], Module::CoreList=>q[0], List::MoreUtils=>q[0] } -# VERSION => q[0.1.8] -# dist => { } -# realclean => { FILES=>q[MYMETA.yml] } - -# --- MakeMaker post_initialize section: - - -# --- MakeMaker const_config section: - -# These definitions are from config.sh (via /usr/local/lib/perl5/5.10.1/mach/Config.pm). -# They may have been overridden via Makefile.PL or on the command line. -AR = ar -CC = cc -CCCDLFLAGS = -DPIC -fPIC -CCDLFLAGS = -Wl,-R/usr/local/lib/perl5/5.10.1/mach/CORE -DLEXT = so -DLSRC = dl_dlopen.xs -EXE_EXT = -FULL_AR = /usr/bin/ar -LD = cc -LDDLFLAGS = -shared -L/usr/local/lib -fstack-protector -LDFLAGS = -Wl,-E -fstack-protector -L/usr/local/lib -LIBC = -LIB_EXT = .a -OBJ_EXT = .o -OSNAME = freebsd -OSVERS = 8.0-release -RANLIB = : -SITELIBEXP = /usr/local/lib/perl5/site_perl/5.10.1 -SITEARCHEXP = /usr/local/lib/perl5/site_perl/5.10.1/mach -SO = so -VENDORARCHEXP = $(VENDORPREFIX)/lib/perl5/5.10.1/i386-freebsd-64int -VENDORLIBEXP = $(VENDORPREFIX)/lib/perl5 - - -# --- MakeMaker constants section: -AR_STATIC_ARGS = cr -DIRFILESEP = / -DFSEP = $(DIRFILESEP) -NAME = Test::Module::Used -NAME_SYM = Test_Module_Used -VERSION = 0.1.8 -VERSION_MACRO = VERSION -VERSION_SYM = 0_1_8 -DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\" -XS_VERSION = 0.1.8 -XS_VERSION_MACRO = XS_VERSION -XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\" -INST_ARCHLIB = blib/arch -INST_SCRIPT = blib/script -INST_BIN = blib/bin -INST_LIB = blib/lib -INST_MAN1DIR = blib/man1 -INST_MAN3DIR = blib/man3 -MAN1EXT = 1 -MAN3EXT = 3 -INSTALLDIRS = site -DESTDIR = -PREFIX = /usr/local -PERLPREFIX = $(PREFIX) -SITEPREFIX = $(PREFIX) -VENDORPREFIX = $(PREFIX) -INSTALLPRIVLIB = /usr/local/lib -DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB) -INSTALLSITELIB = $(SITEPREFIX)/lib/perl5/site_perl/5.10.1 -DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB) -INSTALLVENDORLIB = $(VENDORPREFIX)/lib/perl5 -DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB) -INSTALLARCHLIB = /usr/local/lib -DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB) -INSTALLSITEARCH = $(SITEPREFIX)/lib/perl5/site_perl/5.10.1/mach -DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH) -INSTALLVENDORARCH = $(VENDORPREFIX)/lib/perl5/5.10.1/i386-freebsd-64int -DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH) -INSTALLBIN = $(PERLPREFIX)/bin -DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN) -INSTALLSITEBIN = $(SITEPREFIX)/bin -DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN) -INSTALLVENDORBIN = $(VENDORPREFIX)/bin -DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN) -INSTALLSCRIPT = $(PERLPREFIX)/bin -DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT) -INSTALLSITESCRIPT = $(SITEPREFIX)/bin -DESTINSTALLSITESCRIPT = $(DESTDIR)$(INSTALLSITESCRIPT) -INSTALLVENDORSCRIPT = $(VENDORPREFIX)/bin -DESTINSTALLVENDORSCRIPT = $(DESTDIR)$(INSTALLVENDORSCRIPT) -INSTALLMAN1DIR = $(PERLPREFIX)/man/man1 -DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR) -INSTALLSITEMAN1DIR = $(SITEPREFIX)/man/man1 -DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR) -INSTALLVENDORMAN1DIR = $(VENDORPREFIX)/man/man1 -DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR) -INSTALLMAN3DIR = $(PERLPREFIX)/lib/perl5/5.10.1/perl/man/man3 -DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR) -INSTALLSITEMAN3DIR = $(SITEPREFIX)/lib/perl5/5.10.1/man/man3 -DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR) -INSTALLVENDORMAN3DIR = $(VENDORPREFIX)/man/man3 -DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR) -PERL_LIB = -PERL_ARCHLIB = /usr/local/lib/perl5/5.10.1/mach -LIBPERL_A = libperl.a -FIRST_MAKEFILE = Makefile -MAKEFILE_OLD = Makefile.old -MAKE_APERL_FILE = Makefile.aperl -PERLMAINCC = $(CC) -PERL_INC = /usr/local/lib/perl5/5.10.1/mach/CORE -PERL = /usr/local/bin/perl5.10.1 "-Iinc" -FULLPERL = /usr/local/bin/perl5.10.1 "-Iinc" -ABSPERL = $(PERL) -PERLRUN = $(PERL) -FULLPERLRUN = $(FULLPERL) -ABSPERLRUN = $(ABSPERL) -PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-Iinc" "-I$(INST_LIB)" -FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-Iinc" "-I$(INST_LIB)" -ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-Iinc" "-I$(INST_LIB)" -PERL_CORE = 0 -PERM_DIR = 755 -PERM_RW = 644 -PERM_RWX = 755 - -MAKEMAKER = /usr/local/lib/perl5/5.10.1/ExtUtils/MakeMaker.pm -MM_VERSION = 6.55_02 -MM_REVISION = 65502 - -# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle). -# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle) -# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar) -# DLBASE = Basename part of dynamic library. May be just equal BASEEXT. -MAKE = make -FULLEXT = Test/Module/Used -BASEEXT = Used -PARENT_NAME = Test::Module -DLBASE = $(BASEEXT) -VERSION_FROM = -OBJECT = -LDFROM = $(OBJECT) -LINKTYPE = dynamic -BOOTDEP = - -# Handy lists of source code files: -XS_FILES = -C_FILES = -O_FILES = -H_FILES = -MAN1PODS = -MAN3PODS = lib/Test/Module/Used.pm - -# Where is the Config information that we are using/depend on -CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)config.h - -# Where to build things -INST_LIBDIR = $(INST_LIB)/Test/Module -INST_ARCHLIBDIR = $(INST_ARCHLIB)/Test/Module - -INST_AUTODIR = $(INST_LIB)/auto/$(FULLEXT) -INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT) - -INST_STATIC = -INST_DYNAMIC = -INST_BOOT = - -# Extra linker info -EXPORT_LIST = -PERL_ARCHIVE = -PERL_ARCHIVE_AFTER = - - -TO_INST_PM = lib/Test/Module/Used.pm - -PM_TO_BLIB = lib/Test/Module/Used.pm \ - blib/lib/Test/Module/Used.pm - - -# --- MakeMaker platform_constants section: -MM_Unix_VERSION = 6.55_02 -PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc - - -# --- MakeMaker tool_autosplit section: -# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto -AUTOSPLITFILE = $(ABSPERLRUN) -e 'use AutoSplit; autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1)' -- - - - -# --- MakeMaker tool_xsubpp section: - - -# --- MakeMaker tools_other section: -SHELL = /bin/sh -CHMOD = chmod -CP = cp -MV = mv -NOOP = $(TRUE) -NOECHO = @ -RM_F = rm -f -RM_RF = rm -rf -TEST_F = test -f -TOUCH = touch -UMASK_NULL = umask 0 -DEV_NULL = > /dev/null 2>&1 -MKPATH = $(ABSPERLRUN) -MExtUtils::Command -e 'mkpath' -- -EQUALIZE_TIMESTAMP = $(ABSPERLRUN) -MExtUtils::Command -e 'eqtime' -- -FALSE = false -TRUE = true -ECHO = echo -ECHO_N = echo -n -UNINST = 0 -VERBINST = 0 -MOD_INSTALL = $(ABSPERLRUN) -MExtUtils::Install -e 'install([ from_to => {@ARGV}, verbose => '\''$(VERBINST)'\'', uninstall_shadows => '\''$(UNINST)'\'', dir_mode => '\''$(PERM_DIR)'\'' ]);' -- -DOC_INSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'perllocal_install' -- -UNINSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'uninstall' -- -WARN_IF_OLD_PACKLIST = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'warn_if_old_packlist' -- -MACROSTART = -MACROEND = -USEMAKEFILE = -f -FIXIN = $(ABSPERLRUN) -MExtUtils::MY -e 'MY->fixin(shift)' -- - - -# --- MakeMaker makemakerdflt section: -makemakerdflt : all - $(NOECHO) $(NOOP) - - -# --- MakeMaker dist section: -TAR = tar -TARFLAGS = cvf -ZIP = zip -ZIPFLAGS = -r -COMPRESS = gzip --best -SUFFIX = .gz -SHAR = shar -PREOP = $(NOECHO) $(NOOP) -POSTOP = $(NOECHO) $(NOOP) -TO_UNIX = $(NOECHO) $(NOOP) -CI = ci -u -RCS_LABEL = rcs -Nv$(VERSION_SYM): -q -DIST_CP = best -DIST_DEFAULT = tardist -DISTNAME = Test-Module-Used -DISTVNAME = Test-Module-Used-0.1.8 - - -# --- MakeMaker macro section: - - -# --- MakeMaker depend section: - - -# --- MakeMaker cflags section: - - -# --- MakeMaker const_loadlibs section: - - -# --- MakeMaker const_cccmd section: - - -# --- MakeMaker post_constants section: - - -# --- MakeMaker pasthru section: - -PASTHRU = LIBPERL_A="$(LIBPERL_A)"\ - LINKTYPE="$(LINKTYPE)"\ - PREFIX="$(PREFIX)" - - -# --- MakeMaker special_targets section: -.SUFFIXES : .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT) - -.PHONY: all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir - - - -# --- MakeMaker c_o section: - - -# --- MakeMaker xs_c section: - - -# --- MakeMaker xs_o section: - - -# --- MakeMaker top_targets section: -all :: pure_all manifypods - $(NOECHO) $(NOOP) - - -pure_all :: config pm_to_blib subdirs linkext - $(NOECHO) $(NOOP) - -subdirs :: $(MYEXTLIB) - $(NOECHO) $(NOOP) - -config :: $(FIRST_MAKEFILE) blibdirs - $(NOECHO) $(NOOP) - -help : - perldoc ExtUtils::MakeMaker - - -# --- MakeMaker blibdirs section: -blibdirs : $(INST_LIBDIR)$(DFSEP).exists $(INST_ARCHLIB)$(DFSEP).exists $(INST_AUTODIR)$(DFSEP).exists $(INST_ARCHAUTODIR)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists $(INST_SCRIPT)$(DFSEP).exists $(INST_MAN1DIR)$(DFSEP).exists $(INST_MAN3DIR)$(DFSEP).exists - $(NOECHO) $(NOOP) - -# Backwards compat with 6.18 through 6.25 -blibdirs.ts : blibdirs - $(NOECHO) $(NOOP) - -$(INST_LIBDIR)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_LIBDIR) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_LIBDIR) - $(NOECHO) $(TOUCH) $(INST_LIBDIR)$(DFSEP).exists - -$(INST_ARCHLIB)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_ARCHLIB) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHLIB) - $(NOECHO) $(TOUCH) $(INST_ARCHLIB)$(DFSEP).exists - -$(INST_AUTODIR)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_AUTODIR) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_AUTODIR) - $(NOECHO) $(TOUCH) $(INST_AUTODIR)$(DFSEP).exists - -$(INST_ARCHAUTODIR)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHAUTODIR) - $(NOECHO) $(TOUCH) $(INST_ARCHAUTODIR)$(DFSEP).exists - -$(INST_BIN)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_BIN) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_BIN) - $(NOECHO) $(TOUCH) $(INST_BIN)$(DFSEP).exists - -$(INST_SCRIPT)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_SCRIPT) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_SCRIPT) - $(NOECHO) $(TOUCH) $(INST_SCRIPT)$(DFSEP).exists - -$(INST_MAN1DIR)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_MAN1DIR) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN1DIR) - $(NOECHO) $(TOUCH) $(INST_MAN1DIR)$(DFSEP).exists - -$(INST_MAN3DIR)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_MAN3DIR) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN3DIR) - $(NOECHO) $(TOUCH) $(INST_MAN3DIR)$(DFSEP).exists - - - -# --- MakeMaker linkext section: - -linkext :: $(LINKTYPE) - $(NOECHO) $(NOOP) - - -# --- MakeMaker dlsyms section: - - -# --- MakeMaker dynamic section: - -dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT) - $(NOECHO) $(NOOP) - - -# --- MakeMaker dynamic_bs section: - -BOOTSTRAP = - - -# --- MakeMaker dynamic_lib section: - - -# --- MakeMaker static section: - -## $(INST_PM) has been moved to the all: target. -## It remains here for awhile to allow for old usage: "make static" -static :: $(FIRST_MAKEFILE) $(INST_STATIC) - $(NOECHO) $(NOOP) - - -# --- MakeMaker static_lib section: - - -# --- MakeMaker manifypods section: - -POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--" -POD2MAN = $(POD2MAN_EXE) - - -manifypods : pure_all \ - lib/Test/Module/Used.pm - $(NOECHO) $(POD2MAN) --section=3 --perm_rw=$(PERM_RW) \ - lib/Test/Module/Used.pm $(INST_MAN3DIR)/Test::Module::Used.$(MAN3EXT) - - - - -# --- MakeMaker processPL section: - - -# --- MakeMaker installbin section: - - -# --- MakeMaker subdirs section: - -# none - -# --- MakeMaker clean_subdirs section: -clean_subdirs : - $(NOECHO) $(NOOP) - - -# --- MakeMaker clean section: - -# Delete temporary files but do not touch installed files. We don't delete -# the Makefile here so a later make realclean still has a makefile to use. - -clean :: clean_subdirs - - $(RM_F) \ - *$(LIB_EXT) core \ - core.[0-9] $(INST_ARCHAUTODIR)/extralibs.all \ - core.[0-9][0-9] $(BASEEXT).bso \ - pm_to_blib.ts core.[0-9][0-9][0-9][0-9] \ - $(BASEEXT).x $(BOOTSTRAP) \ - perl$(EXE_EXT) tmon.out \ - *$(OBJ_EXT) pm_to_blib \ - $(INST_ARCHAUTODIR)/extralibs.ld blibdirs.ts \ - core.[0-9][0-9][0-9][0-9][0-9] *perl.core \ - core.*perl.*.? $(MAKE_APERL_FILE) \ - perl $(BASEEXT).def \ - core.[0-9][0-9][0-9] mon.out \ - lib$(BASEEXT).def perlmain.c \ - perl.exe so_locations \ - $(BASEEXT).exp - - $(RM_RF) \ - blib - - $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL) - - -# --- MakeMaker realclean_subdirs section: -realclean_subdirs : - $(NOECHO) $(NOOP) - - -# --- MakeMaker realclean section: -# Delete temporary files (via clean) and also delete dist files -realclean purge :: clean realclean_subdirs - - $(RM_F) \ - $(MAKEFILE_OLD) $(FIRST_MAKEFILE) - - $(RM_RF) \ - MYMETA.yml $(DISTVNAME) - - -# --- MakeMaker metafile section: -metafile : - $(NOECHO) $(NOOP) - - -# --- MakeMaker signature section: -signature : - cpansign -s - - -# --- MakeMaker dist_basics section: -distclean :: realclean distcheck - $(NOECHO) $(NOOP) - -distcheck : - $(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck - -skipcheck : - $(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck - -manifest : - $(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest - -veryclean : realclean - $(RM_F) *~ */*~ *.orig */*.orig *.bak */*.bak *.old */*.old - - - -# --- MakeMaker dist_core section: - -dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE) - $(NOECHO) $(ABSPERLRUN) -l -e 'print '\''Warning: Makefile possibly out of date with $(VERSION_FROM)'\''' \ - -e ' if -e '\''$(VERSION_FROM)'\'' and -M '\''$(VERSION_FROM)'\'' < -M '\''$(FIRST_MAKEFILE)'\'';' -- - -tardist : $(DISTVNAME).tar$(SUFFIX) - $(NOECHO) $(NOOP) - -uutardist : $(DISTVNAME).tar$(SUFFIX) - uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu - -$(DISTVNAME).tar$(SUFFIX) : distdir - $(PREOP) - $(TO_UNIX) - $(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME) - $(RM_RF) $(DISTVNAME) - $(COMPRESS) $(DISTVNAME).tar - $(POSTOP) - -zipdist : $(DISTVNAME).zip - $(NOECHO) $(NOOP) - -$(DISTVNAME).zip : distdir - $(PREOP) - $(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME) - $(RM_RF) $(DISTVNAME) - $(POSTOP) - -shdist : distdir - $(PREOP) - $(SHAR) $(DISTVNAME) > $(DISTVNAME).shar - $(RM_RF) $(DISTVNAME) - $(POSTOP) - - -# --- MakeMaker distdir section: -create_distdir : - $(RM_RF) $(DISTVNAME) - $(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \ - -e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');" - -distdir : create_distdir - $(NOECHO) $(NOOP) - - - -# --- MakeMaker dist_test section: -disttest : distdir - cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL "INSTALLDIRS=site" "CC=cc" "CCFLAGS=-O2 -pipe -fno-strict-aliasing" "PREFIX=/usr/local" "INSTALLPRIVLIB=/usr/local/lib" "INSTALLARCHLIB=/usr/local/lib" - cd $(DISTVNAME) && $(MAKE) $(PASTHRU) - cd $(DISTVNAME) && $(MAKE) test $(PASTHRU) - - - -# --- MakeMaker dist_ci section: - -ci : - $(PERLRUN) "-MExtUtils::Manifest=maniread" \ - -e "@all = keys %{ maniread() };" \ - -e "print(qq{Executing $(CI) @all\n}); system(qq{$(CI) @all});" \ - -e "print(qq{Executing $(RCS_LABEL) ...\n}); system(qq{$(RCS_LABEL) @all});" - - -# --- MakeMaker distmeta section: -distmeta : create_distdir metafile - $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{META.yml} => q{Module meta-data (added by MakeMaker)}}) } ' \ - -e ' or print "Could not add META.yml to MANIFEST: $${'\''@'\''}\n"' -- - - - -# --- MakeMaker distsignature section: -distsignature : create_distdir - $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) } ' \ - -e ' or print "Could not add SIGNATURE to MANIFEST: $${'\''@'\''}\n"' -- - $(NOECHO) cd $(DISTVNAME) && $(TOUCH) SIGNATURE - cd $(DISTVNAME) && cpansign -s - - - -# --- MakeMaker install section: - -install :: pure_install doc_install - $(NOECHO) $(NOOP) - -install_perl :: pure_perl_install - $(NOECHO) $(NOOP) - -install_site :: pure_site_install - $(NOECHO) $(NOOP) - -install_vendor :: pure_vendor_install doc_vendor_install - $(NOECHO) $(NOOP) - -pure_install :: pure_$(INSTALLDIRS)_install - $(NOECHO) $(NOOP) - -doc_install :: - $(NOECHO) $(NOOP) - -pure__install : pure_site_install - $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site - -doc__install : - $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site - -pure_perl_install :: all - $(NOECHO) $(MOD_INSTALL) \ - read $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist \ - write $(DESTINSTALLARCHLIB)/auto/$(FULLEXT)/.packlist \ - $(INST_LIB) $(DESTINSTALLPRIVLIB) \ - $(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \ - $(INST_BIN) $(DESTINSTALLBIN) \ - $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \ - $(INST_MAN1DIR) $(DESTINSTALLMAN1DIR) \ - $(INST_MAN3DIR) $(DESTINSTALLMAN3DIR) - $(NOECHO) $(WARN_IF_OLD_PACKLIST) \ - $(SITEARCHEXP)/auto/$(FULLEXT) - - -pure_site_install :: all - $(NOECHO) $(MOD_INSTALL) \ - read $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist \ - write $(DESTINSTALLSITEARCH)/auto/$(FULLEXT)/.packlist \ - $(INST_LIB) $(DESTINSTALLSITELIB) \ - $(INST_ARCHLIB) $(DESTINSTALLSITEARCH) \ - $(INST_BIN) $(DESTINSTALLSITEBIN) \ - $(INST_SCRIPT) $(DESTINSTALLSITESCRIPT) \ - $(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) \ - $(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR) - $(NOECHO) $(WARN_IF_OLD_PACKLIST) \ - $(PERL_ARCHLIB)/auto/$(FULLEXT) - -pure_vendor_install :: all - $(NOECHO) $(MOD_INSTALL) \ - read $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist \ - write $(DESTINSTALLVENDORARCH)/auto/$(FULLEXT)/.packlist \ - $(INST_LIB) $(DESTINSTALLVENDORLIB) \ - $(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \ - $(INST_BIN) $(DESTINSTALLVENDORBIN) \ - $(INST_SCRIPT) $(DESTINSTALLVENDORSCRIPT) \ - $(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \ - $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR) - -doc_perl_install :: all - $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod - -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) - -$(NOECHO) $(DOC_INSTALL) \ - "Module" "$(NAME)" \ - "installed into" "$(INSTALLPRIVLIB)" \ - LINKTYPE "$(LINKTYPE)" \ - VERSION "$(VERSION)" \ - EXE_FILES "$(EXE_FILES)" \ - >> $(DESTINSTALLARCHLIB)/perllocal.pod - -doc_site_install :: all - $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod - -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) - -$(NOECHO) $(DOC_INSTALL) \ - "Module" "$(NAME)" \ - "installed into" "$(INSTALLSITELIB)" \ - LINKTYPE "$(LINKTYPE)" \ - VERSION "$(VERSION)" \ - EXE_FILES "$(EXE_FILES)" \ - >> $(DESTINSTALLARCHLIB)/perllocal.pod - -doc_vendor_install :: all - $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod - -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) - -$(NOECHO) $(DOC_INSTALL) \ - "Module" "$(NAME)" \ - "installed into" "$(INSTALLVENDORLIB)" \ - LINKTYPE "$(LINKTYPE)" \ - VERSION "$(VERSION)" \ - EXE_FILES "$(EXE_FILES)" \ - >> $(DESTINSTALLARCHLIB)/perllocal.pod - - -uninstall :: uninstall_from_$(INSTALLDIRS)dirs - $(NOECHO) $(NOOP) - -uninstall_from_perldirs :: - $(NOECHO) $(UNINSTALL) $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist - -uninstall_from_sitedirs :: - $(NOECHO) $(UNINSTALL) $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist - -uninstall_from_vendordirs :: - $(NOECHO) $(UNINSTALL) $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist - - -# --- MakeMaker force section: -# Phony target to force checking subdirectories. -FORCE : - $(NOECHO) $(NOOP) - - -# --- MakeMaker perldepend section: - - -# --- MakeMaker makefile section: -# We take a very conservative approach here, but it's worth it. -# We move Makefile to Makefile.old here to avoid gnu make looping. -$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP) - $(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?" - $(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..." - -$(NOECHO) $(RM_F) $(MAKEFILE_OLD) - -$(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) - - $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL) - $(PERLRUN) Makefile.PL "INSTALLDIRS=site" "CC=cc" "CCFLAGS=-O2 -pipe -fno-strict-aliasing" "PREFIX=/usr/local" "INSTALLPRIVLIB=/usr/local/lib" "INSTALLARCHLIB=/usr/local/lib" - $(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <==" - $(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command. <==" - $(FALSE) - - - -# --- MakeMaker staticmake section: - -# --- MakeMaker makeaperl section --- -MAP_TARGET = perl -FULLPERL = /usr/local/bin/perl5.10.1 - -$(MAP_TARGET) :: static $(MAKE_APERL_FILE) - $(MAKE) $(USEMAKEFILE) $(MAKE_APERL_FILE) $@ - -$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) pm_to_blib - $(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET) - $(NOECHO) $(PERLRUNINST) \ - Makefile.PL DIR= \ - MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \ - MAKEAPERL=1 NORECURS=1 CCCDLFLAGS= \ - INSTALLDIRS=site \ - CC=cc \ - CCFLAGS='-O2 -pipe -fno-strict-aliasing' \ - PREFIX=/usr/local \ - INSTALLPRIVLIB=/usr/local/lib \ - INSTALLARCHLIB=/usr/local/lib - - -# --- MakeMaker test section: - -TEST_VERBOSE=0 -TEST_TYPE=test_$(LINKTYPE) -TEST_FILE = test.pl -TEST_FILES = t/*.t -TESTDB_SW = -d - -testdb :: testdb_$(LINKTYPE) - -test :: $(TEST_TYPE) subdirs-test - -subdirs-test :: - $(NOECHO) $(NOOP) - - -test_dynamic :: pure_all - PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), 'inc', '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES) - -testdb_dynamic :: pure_all - PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-Iinc" "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE) - -test_ : test_dynamic - -test_static :: test_dynamic -testdb_static :: testdb_dynamic - - -# --- MakeMaker ppd section: -# Creates a PPD (Perl Package Description) for a binary distribution. -ppd : - $(NOECHO) $(ECHO) '' > $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' Test required module is really used and vice versa bitween lib/t and META.yml' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' Takuya Tsuchida tsucchi@cpan.org' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) '' >> $(DISTNAME).ppd - - -# --- MakeMaker pm_to_blib section: - -pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM) - $(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', q[$(PM_FILTER)], '\''$(PERM_DIR)'\'')' -- \ - lib/Test/Module/Used.pm blib/lib/Test/Module/Used.pm - $(NOECHO) $(TOUCH) pm_to_blib - - -# --- MakeMaker selfdocument section: - - -# --- MakeMaker postamble section: - - -# End. -# Postamble by Module::Install 0.91 diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/Makefile.PL /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/Makefile.PL --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/Makefile.PL 2010-01-05 16:37:37.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/Makefile.PL 1970-01-01 09:00:00.000000000 +0900 @@ -1,18 +0,0 @@ -use inc::Module::Install; -name 'Test-Module-Used'; -author 'Takuya Tsuchida tsucchi@cpan.org'; -license 'perl'; -all_from 'lib/Test/Module/Used.pm'; -requires 'Module::Used'; -requires 'YAML'; -requires 'List::MoreUtils'; -requires 'Module::CoreList'; -requires 'PPI::Document'; -requires 'version' => 0.77; -test_requires 'Test::More'; - -author_tests 'xt'; - -no_index directory => 'testdata'; -repository 'http://github.com/tsucchi/Test-Module-Used'; -WriteAll; diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/README /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/README --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/README 2009-11-25 17:15:26.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/README 1970-01-01 09:00:00.000000000 +0900 @@ -1,10 +0,0 @@ -INSTALLATION - -To install this module type the following: - - perl Makefile.PL - make - make test - make install - - diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/blib/lib/Test/Module/Used.pm /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/blib/lib/Test/Module/Used.pm --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/blib/lib/Test/Module/Used.pm 2010-01-12 16:27:51.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/blib/lib/Test/Module/Used.pm 1970-01-01 09:00:00.000000000 +0900 @@ -1,457 +0,0 @@ -package Test::Module::Used; -use base qw(Exporter); -use strict; -use warnings; -use File::Find; -use File::Spec::Functions qw(catfile); -use Module::Used qw(modules_used_in_document); -use Module::CoreList; -use YAML; -use Test::Builder; -use List::MoreUtils qw(any); -use PPI::Document; -use version; - -use 5.008; -our $VERSION = '0.1.8'; - -=head1 NAME - -Test::Module::Used - Test required module is really used and vice versa bitween lib/t and META.yml - -=head1 SYNOPSIS - - #!/usr/bin/perl -w - use strict; - use warnings; - use Test::Module::Used; - my $used = Test::Module::Used->new(); - $used->ok; - - -=head1 DESCRIPTION - -Test dependency between module and META.yml. - -This module reads I and get I and I. It compares required module is really used and used module is really required. - -=cut - -=head1 Important changes - -Some behavier changed since 0.1.3_01. - -=over 4 - -=item * perl_version set in constructor is prior to use, and read version from META.yml(not read from use statement in *.pm) - -=item * deprecated interfaces are deleted. (module_dir, test_module_dir, exclude_in_moduledir and push_exclude_in_moduledir) - -=back - -=cut - -=head1 methods - -=cut - -=head2 new - -create new instance - -all parameters are passed by hash-style, and optional. - -in ordinary use. - - my $used = Test::Module::Used->new(); - $used->ok(); - -all parameters are as follows.(specified values are default, except I) - - my $used = Test::Module::Used->new( - test_dir => ['t'], # directory(ies) which contains test scripts. - lib_dir => ['lib'], # directory(ies) which contains module libs. - test_lib_dir => ['t'], # directory(ies) which contains libs used ONLY in test (ex. MockObject for test) - meta_file => 'META.yml', # META.yml (contains module requirement information) - perl_version => '5.008', # expected perl version which is used for ignore core-modules in testing - exclude_in_testdir => [], # ignored module(s) for test even if it is used. - exclude_in_libdir => [], # ignored module(s) for your lib even if it is used. - exclude_in_build_requires => [], # ignored module(s) even if it is written in build_requires of META.yml. - exclude_in_requires => [], # ignored module(s) even if it is written in requires of META.yml. - ); - -if perl_version is not passed in constructor, this modules reads I and get perl version. - -I is automatically set by default. This module reads I and parse "pacakge" statement, then found "package" statements and myself(Test::Module::Used) is set. -I is also automatically set by default. This module reads I and parse "package" statement, found "package" statement are set.(Test::Module::Used isnt included) - -=cut - -sub new { - my $class = shift; - my (%opt) = @_; - my $self = { - test_dir => $opt{test_dir} || ['t'], - lib_dir => $opt{lib_dir} || ['lib'], - test_lib_dir => $opt{test_lib_dir} || ['t'], - meta_file => $opt{meta_file} || 'META.yml', - perl_version => $opt{perl_version}, - exclude_in_testdir => $opt{exclude_in_testdir}, - exclude_in_libdir => $opt{exclude_in_libdir}, - exclude_in_build_requires => $opt{exclude_in_build_requires} || [], - exclude_in_requires => $opt{exclude_in_requires} || [], - }; - bless $self, $class; - $self->_get_packages(); - return $self; -} - - -sub _test_dir { - return shift->{test_dir}; -} - -sub _lib_dir { - return shift->{lib_dir}; -} - -sub _test_lib_dir { - return shift->{test_lib_dir}; -} - -sub _meta_file { - return shift->{meta_file}; -} - -sub _perl_version { - return shift->{perl_version}; -} - -=head2 ok - -check used module is ok. - - my $used = Test::Module::Used->new( - exclude_in_testdir => ['Test::Module::Used', 'My::Module'], - ); - $used->ok; - - -First, This module reads I and get I and I. Next, reads module directory (by default I) and test directory(by default I), and compare required module is really used and used module is really required. If all these requirement information is OK, test will success. - -=cut - -sub ok { - my $self = shift; - my $test = Test::Builder->new(); - - - my $num_tests = $self->_num_tests(); - if ( $num_tests > 0 ) { - $test->plan(tests => $num_tests); - my $status_requires_ok = $self->_requires_ok($test, - [$self->_remove_core($self->_used_modules)], - [$self->_remove_core($self->_requires)], - "lib"); - my $status_build_requires_ok = $self->_requires_ok($test, - [$self->_remove_core($self->_used_modules_in_test)], - [$self->_remove_core($self->_build_requires)], - "test"); - return $status_requires_ok && $status_build_requires_ok; - } - else { - $test->plan(tests => 1); - $test->ok(1, "no tests run"); - return 1; - } -} - -=head2 push_exclude_in_libdir( @exclude_module_names ) - -add ignored module(s) for your module(lib) even if it is used after new()'ed. -this is usable if you want to use auto set feature for I but manually specify exclude modules. - -For example, - - my $used = Test::Module::Used->new(); #automatically set exclude_in_libdir - $used->push_exclude_in_libdir( qw(Some::Module::Which::You::Want::To::Exclude) );#module(s) which you want to exclude - $used->ok(); #do test - -=cut - -sub push_exclude_in_libdir { - my $self = shift; - my @exclude_module_names = @_; - push @{$self->{exclude_in_libdir}},@exclude_module_names; -} - - - -=head2 push_exclude_in_testdir( @exclude_module_names ) - -add ignored module(s) for test even if it is used after new()'ed. -this is usable if you want to use auto set feature for I but manually specify exclude modules. - -For example, - - my $used = Test::Module::Used->new(); #automatically set exclude_in_testdir - $used->push_exclude_in_testdir( qw(Some::Module::Which::You::Want::To::Exclude) );#module(s) which you want to exclude - $used->ok(); #do test - -=cut - -sub push_exclude_in_testdir { - my $self = shift; - my @exclude_module_names = @_; - push @{$self->{exclude_in_testdir}},@exclude_module_names; -} - -sub _version { - my $self = shift; - if ( !defined $self->{version} ) { - $self->{version} = $self->_perl_version || $self->_version_from_meta || "5.008000"; - } - return $self->{version}; -} - -sub _num_tests { - my $self = shift; - - return scalar($self->_remove_core($self->_used_modules, - $self->_requires, - $self->_used_modules_in_test, - $self->_build_requires)); -} - -sub _requires_ok { - my $self = shift; - my ($test, $used_aref, $requires_aref, $place) = @_; - - my $status1 = $self->_check_required_but_not_used($test, $requires_aref, $used_aref, $place); - my $status2 = $self->_check_used_but_not_required($test, $requires_aref, $used_aref, $place); - - return $status1 && $status2; -} - - -sub _check_required_but_not_used { - my $self = shift; - my ($test, $requires_aref, $used_aref, $place) = @_; - my @requires = @{$requires_aref}; - my @used = @{$used_aref}; - - my $result = 1; - for my $require ( @requires ) { - my $status = any { $_ eq $require } @used; - $test->ok( $status, "check required module: $require" ); - if ( !$status ) { - $test->diag("module $require is required but not used in $place"); - $result = 0; - } - } - return $result; -} - -sub _check_used_but_not_required { - my $self = shift; - my ($test, $requires_aref, $used_aref, $place) = @_; - my @requires = @{$requires_aref}; - my @used = @{$used_aref}; - - my $result = 1; - for my $used ( @used ) { - my $status = any { $_ eq $used } @requires; - $test->ok( $status, "check used module: $used" ); - if ( !$status ) { - $test->diag("module $used is used in $place but not required"); - $result = 0; - } - } - return $result; -} - -sub _pm_files { - my $self = shift; - if ( !defined $self->{pm_files} ) { - my @files = $self->_find_files_by_ext($self->_lib_dir, qr/\.pm$/); - $self->{pm_files} = \@files; - } - return @{$self->{pm_files}}; -} - -sub _pm_files_in_test { - my $self = shift; - if ( !defined $self->{pm_files_in_test} ) { - my @files = $self->_find_files_by_ext($self->_test_lib_dir, qr/\.pm$/); - $self->{pm_files_in_test} = \@files; - } - return @{$self->{pm_files_in_test}}; -} - -sub _test_files { - my $self = shift; - return $self->_find_files_by_ext($self->_test_dir, qr/\.t$/); -} - -sub _find_files_by_ext { - my $self = shift; - my ($start_dirs_aref, $ext_qr) = @_; - my @result; - find( sub { - push @result, catfile($File::Find::dir, $_) if ( $_ =~ $ext_qr ); - }, - @{$start_dirs_aref}); - return @result; -} - -sub _used_modules { - my $self = shift; - if ( !defined $self->{used_modules} ) { - my @used = map { modules_used_in_document($self->_ppi_for($_)) } $self->_pm_files; - my @result = _array_difference(\@used, $self->{exclude_in_libdir}); - $self->{used_modules} = \@result; - } - return @{$self->{used_modules}}; -} - -sub _used_modules_in_test { - my $self = shift; - if ( !defined $self->{used_modules_in_test} ) { - my @used = map { modules_used_in_document($self->_ppi_for($_)) } $self->_test_files; - my @result = _array_difference(\@used, $self->{exclude_in_testdir}); - $self->{used_modules_in_test} = \@result; - } - return @{$self->{used_modules_in_test}}; -} - -sub _array_difference { - my ( $aref1, $aref2 ) = @_; - my @a1 = @{$aref1}; - my @a2 = @{$aref2}; - - for my $a2 ( @a2 ) { - @a1 = grep { $_ ne $a2 } @a1; - } - return @a1; -} - -sub _version_from_meta { - my $self = shift; - return $self->{version_from_meta}; -} - -sub _remove_core { - my $self = shift; - my( @module_names ) = @_; - my @result = grep { !$self->_is_core_module($_) } @module_names; - return @result; -} - -sub _is_core_module { - my $self = shift; - my($module_name) = @_; - my $first_release = Module::CoreList->first_release($module_name); - return defined $first_release && $first_release <= $self->_version; -} - -sub _read_meta_yml { - my $self = shift; - my $yaml = YAML::LoadFile( $self->_meta_file ); - $self->{build_requires} = $yaml->{build_requires}; - $self->{version_from_meta} = version->parse($yaml->{requires}->{perl})->numify() if defined $yaml->{requires}->{perl}; - delete $yaml->{requires}->{perl}; - $self->{requires} = $yaml->{requires}; -} - -sub _build_requires { - my $self = shift; - - $self->_read_meta_yml if !defined $self->{build_requires}; - my @result = sort keys %{$self->{build_requires}}; - return _array_difference(\@result, $self->{exclude_in_build_requires}); -} - -sub _requires { - my $self = shift; - - $self->_read_meta_yml if !defined $self->{requires}; - my @result = sort keys %{$self->{requires}}; - return _array_difference(\@result, $self->{exclude_in_requires}); -} - -# find package statements in lib -sub _get_packages { - my $self = shift; - my @packages = $self->_packages_in( $self->_pm_files ); - my @exclude_in_testdir = (__PACKAGE__, @packages, $self->_packages_in($self->_pm_files_in_test)); - $self->push_exclude_in_testdir(@exclude_in_testdir) if ( !defined $self->{exclude_in_testdir} ); - $self->push_exclude_in_libdir(@packages) if ( !defined $self->{exclude_in_libdir} ); -} - -sub _packages_in { - my $self = shift; - my ( @filenames ) = @_; - - my @result; - for my $filename ( @filenames ) { - my @packages = $self->_packages_in_file($filename); - push @result, @packages; - } - return @result; -} - -sub _packages_in_file { - my $self = shift; - my ( $filename ) = @_; - - my $doc = $self->_ppi_for($filename); - my $packages = $doc->find('PPI::Statement::Package'); - return if ( $packages eq '' ); - - my @result; - for my $item ( @{$packages} ) { - for my $token ( @{$item->{children}} ) { - next if ( !$token->isa('PPI::Token::Word') ); - next if ( $token->content eq 'package' ); - push @result, $token->content; - } - } - return @result; -} - -# PPI::Document object for $filename -sub _ppi_for { - my $self = shift; - my ($filename) = @_; - if ( !defined $self->{ppi_for}->{$filename} ) { - my $doc = PPI::Document->new($filename); - $self->{ppi_for}->{$filename} = $doc; - } - return $self->{ppi_for}->{$filename}; -} - - -1; -__END__ - -=head1 AUTHOR - -Takuya Tsuchida Etsucchi@cpan.orgE - -=head1 SEE ALSO - -L has almost same feature. - -=head1 REPOSITORY - -L - - -=head1 COPYRIGHT AND LICENSE - -Copyright (c) 2008-2010 Takuya Tsuchida - -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. - -=cut diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/blib/man3/Test::Module::Used.3 /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/blib/man3/Test::Module::Used.3 --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/blib/man3/Test::Module::Used.3 2010-01-15 12:51:50.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/blib/man3/Test::Module::Used.3 1970-01-01 09:00:00.000000000 +0900 @@ -1,243 +0,0 @@ -.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.ie \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. nr % 0 -. rr F -.\} -.el \{\ -. de IX -.. -.\} -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ======================================================================== -.\" -.IX Title "Test::Module::Used 3" -.TH Test::Module::Used 3 "2010-01-12" "perl v5.10.1" "User Contributed Perl Documentation" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAME" -Test::Module::Used \- Test required module is really used and vice versa bitween lib/t and META.yml -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -.Vb 6 -\& #!/usr/bin/perl \-w -\& use strict; -\& use warnings; -\& use Test::Module::Used; -\& my $used = Test::Module::Used\->new(); -\& $used\->ok; -.Ve -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -Test dependency between module and \s-1META\s0.yml. -.PP -This module reads \fI\s-1META\s0.yml\fR and get \fIbuild_requires\fR and \fIrequires\fR. It compares required module is really used and used module is really required. -.SH "Important changes" -.IX Header "Important changes" -Some behavier changed since 0.1.3_01. -.IP "\(bu" 4 -perl_version set in constructor is prior to use, and read version from \s-1META\s0.yml(not read from use statement in *.pm) -.IP "\(bu" 4 -deprecated interfaces are deleted. (module_dir, test_module_dir, exclude_in_moduledir and push_exclude_in_moduledir) -.SH "methods" -.IX Header "methods" -.SS "new" -.IX Subsection "new" -create new instance -.PP -all parameters are passed by hash-style, and optional. -.PP -in ordinary use. -.PP -.Vb 2 -\& my $used = Test::Module::Used\->new(); -\& $used\->ok(); -.Ve -.PP -all parameters are as follows.(specified values are default, except \fIexclude_in_testdir\fR) -.PP -.Vb 11 -\& my $used = Test::Module::Used\->new( -\& test_dir => [\*(Aqt\*(Aq], # directory(ies) which contains test scripts. -\& lib_dir => [\*(Aqlib\*(Aq], # directory(ies) which contains module libs. -\& test_lib_dir => [\*(Aqt\*(Aq], # directory(ies) which contains libs used ONLY in test (ex. MockObject for test) -\& meta_file => \*(AqMETA.yml\*(Aq, # META.yml (contains module requirement information) -\& perl_version => \*(Aq5.008\*(Aq, # expected perl version which is used for ignore core\-modules in testing -\& exclude_in_testdir => [], # ignored module(s) for test even if it is used. -\& exclude_in_libdir => [], # ignored module(s) for your lib even if it is used. -\& exclude_in_build_requires => [], # ignored module(s) even if it is written in build_requires of META.yml. -\& exclude_in_requires => [], # ignored module(s) even if it is written in requires of META.yml. -\& ); -.Ve -.PP -if perl_version is not passed in constructor, this modules reads \fImeta_file\fR and get perl version. -.PP -\&\fIexclude_in_testdir\fR is automatically set by default. This module reads \fIlib_dir\fR and parse \*(L"pacakge\*(R" statement, then found \*(L"package\*(R" statements and myself(Test::Module::Used) is set. -\&\fIexclude_in_libdir\fR is also automatically set by default. This module reads \fIlib_dir\fR and parse \*(L"package\*(R" statement, found \*(L"package\*(R" statement are set.(Test::Module::Used isnt included) -.SS "ok" -.IX Subsection "ok" -check used module is ok. -.PP -.Vb 4 -\& my $used = Test::Module::Used\->new( -\& exclude_in_testdir => [\*(AqTest::Module::Used\*(Aq, \*(AqMy::Module\*(Aq], -\& ); -\& $used\->ok; -.Ve -.PP -First, This module reads \fI\s-1META\s0.yml\fR and get \fIbuild_requires\fR and \fIrequires\fR. Next, reads module directory (by default \fIlib\fR) and test directory(by default \fIt\fR), and compare required module is really used and used module is really required. If all these requirement information is \s-1OK\s0, test will success. -.ie n .SS "push_exclude_in_libdir( @exclude_module_names )" -.el .SS "push_exclude_in_libdir( \f(CW@exclude_module_names\fP )" -.IX Subsection "push_exclude_in_libdir( @exclude_module_names )" -add ignored module(s) for your module(lib) even if it is used after \fInew()\fR'ed. -this is usable if you want to use auto set feature for \fIexclude_in_libdir\fR but manually specify exclude modules. -.PP -For example, -.PP -.Vb 3 -\& my $used = Test::Module::Used\->new(); #automatically set exclude_in_libdir -\& $used\->push_exclude_in_libdir( qw(Some::Module::Which::You::Want::To::Exclude) );#module(s) which you want to exclude -\& $used\->ok(); #do test -.Ve -.ie n .SS "push_exclude_in_testdir( @exclude_module_names )" -.el .SS "push_exclude_in_testdir( \f(CW@exclude_module_names\fP )" -.IX Subsection "push_exclude_in_testdir( @exclude_module_names )" -add ignored module(s) for test even if it is used after \fInew()\fR'ed. -this is usable if you want to use auto set feature for \fIexclude_in_testdir\fR but manually specify exclude modules. -.PP -For example, -.PP -.Vb 3 -\& my $used = Test::Module::Used\->new(); #automatically set exclude_in_testdir -\& $used\->push_exclude_in_testdir( qw(Some::Module::Which::You::Want::To::Exclude) );#module(s) which you want to exclude -\& $used\->ok(); #do test -.Ve -.SH "AUTHOR" -.IX Header "AUTHOR" -Takuya Tsuchida -.SH "SEE ALSO" -.IX Header "SEE ALSO" -Test::Dependencies has almost same feature. -.SH "REPOSITORY" -.IX Header "REPOSITORY" - -.SH "COPYRIGHT AND LICENSE" -.IX Header "COPYRIGHT AND LICENSE" -Copyright (c) 2008\-2010 Takuya Tsuchida -.PP -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/AuthorTests.pm /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/AuthorTests.pm --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/AuthorTests.pm 2010-01-12 16:28:20.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/AuthorTests.pm 1970-01-01 09:00:00.000000000 +0900 @@ -1,59 +0,0 @@ -#line 1 -package Module::Install::AuthorTests; - -use 5.005; -use strict; -use Module::Install::Base; -use Carp (); - -#line 16 - -use vars qw{$VERSION $ISCORE @ISA}; -BEGIN { - $VERSION = '0.002'; - $ISCORE = 1; - @ISA = qw{Module::Install::Base}; -} - -#line 42 - -sub author_tests { - my ($self, @dirs) = @_; - _add_author_tests($self, \@dirs, 0); -} - -#line 56 - -sub recursive_author_tests { - my ($self, @dirs) = @_; - _add_author_tests($self, \@dirs, 1); -} - -sub _wanted { - my $href = shift; - sub { /\.t$/ and -f $_ and $href->{$File::Find::dir} = 1 } -} - -sub _add_author_tests { - my ($self, $dirs, $recurse) = @_; - return unless $Module::Install::AUTHOR; - - my @tests = $self->tests ? (split / /, $self->tests) : 't/*.t'; - - # XXX: pick a default, later -- rjbs, 2008-02-24 - my @dirs = @$dirs ? @$dirs : Carp::confess "no dirs given to author_tests"; - @dirs = grep { -d } @dirs; - - if ($recurse) { - require File::Find; - my %test_dir; - File::Find::find(_wanted(\%test_dir), @dirs); - $self->tests( join ' ', @tests, map { "$_/*.t" } sort keys %test_dir ); - } else { - $self->tests( join ' ', @tests, map { "$_/*.t" } sort @dirs ); - } -} - -#line 107 - -1; diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Base.pm /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Base.pm --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Base.pm 2010-01-12 16:28:20.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Base.pm 1970-01-01 09:00:00.000000000 +0900 @@ -1,78 +0,0 @@ -#line 1 -package Module::Install::Base; - -use strict 'vars'; -use vars qw{$VERSION}; -BEGIN { - $VERSION = '0.91'; -} - -# Suspend handler for "redefined" warnings -BEGIN { - my $w = $SIG{__WARN__}; - $SIG{__WARN__} = sub { $w }; -} - -#line 42 - -sub new { - my $class = shift; - unless ( defined &{"${class}::call"} ) { - *{"${class}::call"} = sub { shift->_top->call(@_) }; - } - unless ( defined &{"${class}::load"} ) { - *{"${class}::load"} = sub { shift->_top->load(@_) }; - } - bless { @_ }, $class; -} - -#line 61 - -sub AUTOLOAD { - local $@; - my $func = eval { shift->_top->autoload } or return; - goto &$func; -} - -#line 75 - -sub _top { - $_[0]->{_top}; -} - -#line 90 - -sub admin { - $_[0]->_top->{admin} - or - Module::Install::Base::FakeAdmin->new; -} - -#line 106 - -sub is_admin { - $_[0]->admin->VERSION; -} - -sub DESTROY {} - -package Module::Install::Base::FakeAdmin; - -my $fake; - -sub new { - $fake ||= bless(\@_, $_[0]); -} - -sub AUTOLOAD {} - -sub DESTROY {} - -# Restore warning handler -BEGIN { - $SIG{__WARN__} = $SIG{__WARN__}->(); -} - -1; - -#line 154 diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Can.pm /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Can.pm --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Can.pm 2010-01-12 16:28:21.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Can.pm 1970-01-01 09:00:00.000000000 +0900 @@ -1,81 +0,0 @@ -#line 1 -package Module::Install::Can; - -use strict; -use Config (); -use File::Spec (); -use ExtUtils::MakeMaker (); -use Module::Install::Base (); - -use vars qw{$VERSION @ISA $ISCORE}; -BEGIN { - $VERSION = '0.91'; - @ISA = 'Module::Install::Base'; - $ISCORE = 1; -} - -# check if we can load some module -### Upgrade this to not have to load the module if possible -sub can_use { - my ($self, $mod, $ver) = @_; - $mod =~ s{::|\\}{/}g; - $mod .= '.pm' unless $mod =~ /\.pm$/i; - - my $pkg = $mod; - $pkg =~ s{/}{::}g; - $pkg =~ s{\.pm$}{}i; - - local $@; - eval { require $mod; $pkg->VERSION($ver || 0); 1 }; -} - -# check if we can run some command -sub can_run { - my ($self, $cmd) = @_; - - my $_cmd = $cmd; - return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd)); - - for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') { - next if $dir eq ''; - my $abs = File::Spec->catfile($dir, $_[1]); - return $abs if (-x $abs or $abs = MM->maybe_command($abs)); - } - - return; -} - -# can we locate a (the) C compiler -sub can_cc { - my $self = shift; - my @chunks = split(/ /, $Config::Config{cc}) or return; - - # $Config{cc} may contain args; try to find out the program part - while (@chunks) { - return $self->can_run("@chunks") || (pop(@chunks), next); - } - - return; -} - -# Fix Cygwin bug on maybe_command(); -if ( $^O eq 'cygwin' ) { - require ExtUtils::MM_Cygwin; - require ExtUtils::MM_Win32; - if ( ! defined(&ExtUtils::MM_Cygwin::maybe_command) ) { - *ExtUtils::MM_Cygwin::maybe_command = sub { - my ($self, $file) = @_; - if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) { - ExtUtils::MM_Win32->maybe_command($file); - } else { - ExtUtils::MM_Unix->maybe_command($file); - } - } - } -} - -1; - -__END__ - -#line 156 diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Fetch.pm /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Fetch.pm --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Fetch.pm 2010-01-12 16:28:21.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Fetch.pm 1970-01-01 09:00:00.000000000 +0900 @@ -1,93 +0,0 @@ -#line 1 -package Module::Install::Fetch; - -use strict; -use Module::Install::Base (); - -use vars qw{$VERSION @ISA $ISCORE}; -BEGIN { - $VERSION = '0.91'; - @ISA = 'Module::Install::Base'; - $ISCORE = 1; -} - -sub get_file { - my ($self, %args) = @_; - my ($scheme, $host, $path, $file) = - $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return; - - if ( $scheme eq 'http' and ! eval { require LWP::Simple; 1 } ) { - $args{url} = $args{ftp_url} - or (warn("LWP support unavailable!\n"), return); - ($scheme, $host, $path, $file) = - $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return; - } - - $|++; - print "Fetching '$file' from $host... "; - - unless (eval { require Socket; Socket::inet_aton($host) }) { - warn "'$host' resolve failed!\n"; - return; - } - - return unless $scheme eq 'ftp' or $scheme eq 'http'; - - require Cwd; - my $dir = Cwd::getcwd(); - chdir $args{local_dir} or return if exists $args{local_dir}; - - if (eval { require LWP::Simple; 1 }) { - LWP::Simple::mirror($args{url}, $file); - } - elsif (eval { require Net::FTP; 1 }) { eval { - # use Net::FTP to get past firewall - my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600); - $ftp->login("anonymous", 'anonymous@example.com'); - $ftp->cwd($path); - $ftp->binary; - $ftp->get($file) or (warn("$!\n"), return); - $ftp->quit; - } } - elsif (my $ftp = $self->can_run('ftp')) { eval { - # no Net::FTP, fallback to ftp.exe - require FileHandle; - my $fh = FileHandle->new; - - local $SIG{CHLD} = 'IGNORE'; - unless ($fh->open("|$ftp -n")) { - warn "Couldn't open ftp: $!\n"; - chdir $dir; return; - } - - my @dialog = split(/\n/, <<"END_FTP"); -open $host -user anonymous anonymous\@example.com -cd $path -binary -get $file $file -quit -END_FTP - foreach (@dialog) { $fh->print("$_\n") } - $fh->close; - } } - else { - warn "No working 'ftp' program available!\n"; - chdir $dir; return; - } - - unless (-f $file) { - warn "Fetching failed: $@\n"; - chdir $dir; return; - } - - return if exists $args{size} and -s $file != $args{size}; - system($args{run}) if exists $args{run}; - unlink($file) if $args{remove}; - - print(((!exists $args{check_for} or -e $args{check_for}) - ? "done!" : "failed! ($!)"), "\n"); - chdir $dir; return !$?; -} - -1; diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Makefile.pm /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Makefile.pm --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Makefile.pm 2010-01-12 16:28:21.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Makefile.pm 1970-01-01 09:00:00.000000000 +0900 @@ -1,268 +0,0 @@ -#line 1 -package Module::Install::Makefile; - -use strict 'vars'; -use ExtUtils::MakeMaker (); -use Module::Install::Base (); - -use vars qw{$VERSION @ISA $ISCORE}; -BEGIN { - $VERSION = '0.91'; - @ISA = 'Module::Install::Base'; - $ISCORE = 1; -} - -sub Makefile { $_[0] } - -my %seen = (); - -sub prompt { - shift; - - # Infinite loop protection - my @c = caller(); - if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) { - die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])"; - } - - # In automated testing, always use defaults - if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) { - local $ENV{PERL_MM_USE_DEFAULT} = 1; - goto &ExtUtils::MakeMaker::prompt; - } else { - goto &ExtUtils::MakeMaker::prompt; - } -} - -sub makemaker_args { - my $self = shift; - my $args = ( $self->{makemaker_args} ||= {} ); - %$args = ( %$args, @_ ); - return $args; -} - -# For mm args that take multiple space-seperated args, -# append an argument to the current list. -sub makemaker_append { - my $self = sShift; - my $name = shift; - my $args = $self->makemaker_args; - $args->{name} = defined $args->{$name} - ? join( ' ', $args->{name}, @_ ) - : join( ' ', @_ ); -} - -sub build_subdirs { - my $self = shift; - my $subdirs = $self->makemaker_args->{DIR} ||= []; - for my $subdir (@_) { - push @$subdirs, $subdir; - } -} - -sub clean_files { - my $self = shift; - my $clean = $self->makemaker_args->{clean} ||= {}; - %$clean = ( - %$clean, - FILES => join ' ', grep { length $_ } ($clean->{FILES} || (), @_), - ); -} - -sub realclean_files { - my $self = shift; - my $realclean = $self->makemaker_args->{realclean} ||= {}; - %$realclean = ( - %$realclean, - FILES => join ' ', grep { length $_ } ($realclean->{FILES} || (), @_), - ); -} - -sub libs { - my $self = shift; - my $libs = ref $_[0] ? shift : [ shift ]; - $self->makemaker_args( LIBS => $libs ); -} - -sub inc { - my $self = shift; - $self->makemaker_args( INC => shift ); -} - -my %test_dir = (); - -sub _wanted_t { - /\.t$/ and -f $_ and $test_dir{$File::Find::dir} = 1; -} - -sub tests_recursive { - my $self = shift; - if ( $self->tests ) { - die "tests_recursive will not work if tests are already defined"; - } - my $dir = shift || 't'; - unless ( -d $dir ) { - die "tests_recursive dir '$dir' does not exist"; - } - %test_dir = (); - require File::Find; - File::Find::find( \&_wanted_t, $dir ); - $self->tests( join ' ', map { "$_/*.t" } sort keys %test_dir ); -} - -sub write { - my $self = shift; - die "&Makefile->write() takes no arguments\n" if @_; - - # Check the current Perl version - my $perl_version = $self->perl_version; - if ( $perl_version ) { - eval "use $perl_version; 1" - or die "ERROR: perl: Version $] is installed, " - . "but we need version >= $perl_version"; - } - - # Make sure we have a new enough MakeMaker - require ExtUtils::MakeMaker; - - if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) { - # MakeMaker can complain about module versions that include - # an underscore, even though its own version may contain one! - # Hence the funny regexp to get rid of it. See RT #35800 - # for details. - $self->build_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ ); - $self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ ); - } else { - # Allow legacy-compatibility with 5.005 by depending on the - # most recent EU:MM that supported 5.005. - $self->build_requires( 'ExtUtils::MakeMaker' => 6.42 ); - $self->configure_requires( 'ExtUtils::MakeMaker' => 6.42 ); - } - - # Generate the MakeMaker params - my $args = $self->makemaker_args; - $args->{DISTNAME} = $self->name; - $args->{NAME} = $self->module_name || $self->name; - $args->{VERSION} = $self->version; - $args->{NAME} =~ s/-/::/g; - if ( $self->tests ) { - $args->{test} = { TESTS => $self->tests }; - } - if ( $] >= 5.005 ) { - $args->{ABSTRACT} = $self->abstract; - $args->{AUTHOR} = $self->author; - } - if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) { - $args->{NO_META} = 1; - } - if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) { - $args->{SIGN} = 1; - } - unless ( $self->is_admin ) { - delete $args->{SIGN}; - } - - # Merge both kinds of requires into prereq_pm - my $prereq = ($args->{PREREQ_PM} ||= {}); - %$prereq = ( %$prereq, - map { @$_ } - map { @$_ } - grep $_, - ($self->configure_requires, $self->build_requires, $self->requires) - ); - - # Remove any reference to perl, PREREQ_PM doesn't support it - delete $args->{PREREQ_PM}->{perl}; - - # merge both kinds of requires into prereq_pm - my $subdirs = ($args->{DIR} ||= []); - if ($self->bundles) { - foreach my $bundle (@{ $self->bundles }) { - my ($file, $dir) = @$bundle; - push @$subdirs, $dir if -d $dir; - delete $prereq->{$file}; - } - } - - if ( my $perl_version = $self->perl_version ) { - eval "use $perl_version; 1" - or die "ERROR: perl: Version $] is installed, " - . "but we need version >= $perl_version"; - } - - $args->{INSTALLDIRS} = $self->installdirs; - - my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_})} keys %$args; - - my $user_preop = delete $args{dist}->{PREOP}; - if (my $preop = $self->admin->preop($user_preop)) { - foreach my $key ( keys %$preop ) { - $args{dist}->{$key} = $preop->{$key}; - } - } - - my $mm = ExtUtils::MakeMaker::WriteMakefile(%args); - $self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile'); -} - -sub fix_up_makefile { - my $self = shift; - my $makefile_name = shift; - my $top_class = ref($self->_top) || ''; - my $top_version = $self->_top->VERSION || ''; - - my $preamble = $self->preamble - ? "# Preamble by $top_class $top_version\n" - . $self->preamble - : ''; - my $postamble = "# Postamble by $top_class $top_version\n" - . ($self->postamble || ''); - - local *MAKEFILE; - open MAKEFILE, "< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!"; - my $makefile = do { local $/; }; - close MAKEFILE or die $!; - - $makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /; - $makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g; - $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g; - $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m; - $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m; - - # Module::Install will never be used to build the Core Perl - # Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks - # PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist - $makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m; - #$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m; - - # Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well. - $makefile =~ s/(\"?)-I\$\(PERL_LIB\)\1//g; - - # XXX - This is currently unused; not sure if it breaks other MM-users - # $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg; - - open MAKEFILE, "> $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!"; - print MAKEFILE "$preamble$makefile$postamble" or die $!; - close MAKEFILE or die $!; - - 1; -} - -sub preamble { - my ($self, $text) = @_; - $self->{preamble} = $text . $self->{preamble} if defined $text; - $self->{preamble}; -} - -sub postamble { - my ($self, $text) = @_; - $self->{postamble} ||= $self->admin->postamble; - $self->{postamble} .= $text if defined $text; - $self->{postamble} -} - -1; - -__END__ - -#line 394 diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Metadata.pm /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Metadata.pm --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Metadata.pm 2010-01-12 16:28:20.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Metadata.pm 1970-01-01 09:00:00.000000000 +0900 @@ -1,624 +0,0 @@ -#line 1 -package Module::Install::Metadata; - -use strict 'vars'; -use Module::Install::Base (); - -use vars qw{$VERSION @ISA $ISCORE}; -BEGIN { - $VERSION = '0.91'; - @ISA = 'Module::Install::Base'; - $ISCORE = 1; -} - -my @boolean_keys = qw{ - sign -}; - -my @scalar_keys = qw{ - name - module_name - abstract - author - version - distribution_type - tests - installdirs -}; - -my @tuple_keys = qw{ - configure_requires - build_requires - requires - recommends - bundles - resources -}; - -my @resource_keys = qw{ - homepage - bugtracker - repository -}; - -my @array_keys = qw{ - keywords -}; - -sub Meta { shift } -sub Meta_BooleanKeys { @boolean_keys } -sub Meta_ScalarKeys { @scalar_keys } -sub Meta_TupleKeys { @tuple_keys } -sub Meta_ResourceKeys { @resource_keys } -sub Meta_ArrayKeys { @array_keys } - -foreach my $key ( @boolean_keys ) { - *$key = sub { - my $self = shift; - if ( defined wantarray and not @_ ) { - return $self->{values}->{$key}; - } - $self->{values}->{$key} = ( @_ ? $_[0] : 1 ); - return $self; - }; -} - -foreach my $key ( @scalar_keys ) { - *$key = sub { - my $self = shift; - return $self->{values}->{$key} if defined wantarray and !@_; - $self->{values}->{$key} = shift; - return $self; - }; -} - -foreach my $key ( @array_keys ) { - *$key = sub { - my $self = shift; - return $self->{values}->{$key} if defined wantarray and !@_; - $self->{values}->{$key} ||= []; - push @{$self->{values}->{$key}}, @_; - return $self; - }; -} - -foreach my $key ( @resource_keys ) { - *$key = sub { - my $self = shift; - unless ( @_ ) { - return () unless $self->{values}->{resources}; - return map { $_->[1] } - grep { $_->[0] eq $key } - @{ $self->{values}->{resources} }; - } - return $self->{values}->{resources}->{$key} unless @_; - my $uri = shift or die( - "Did not provide a value to $key()" - ); - $self->resources( $key => $uri ); - return 1; - }; -} - -foreach my $key ( grep { $_ ne "resources" } @tuple_keys) { - *$key = sub { - my $self = shift; - return $self->{values}->{$key} unless @_; - my @added; - while ( @_ ) { - my $module = shift or last; - my $version = shift || 0; - push @added, [ $module, $version ]; - } - push @{ $self->{values}->{$key} }, @added; - return map {@$_} @added; - }; -} - -# Resource handling -my %lc_resource = map { $_ => 1 } qw{ - homepage - license - bugtracker - repository -}; - -sub resources { - my $self = shift; - while ( @_ ) { - my $name = shift or last; - my $value = shift or next; - if ( $name eq lc $name and ! $lc_resource{$name} ) { - die("Unsupported reserved lowercase resource '$name'"); - } - $self->{values}->{resources} ||= []; - push @{ $self->{values}->{resources} }, [ $name, $value ]; - } - $self->{values}->{resources}; -} - -# Aliases for build_requires that will have alternative -# meanings in some future version of META.yml. -sub test_requires { shift->build_requires(@_) } -sub install_requires { shift->build_requires(@_) } - -# Aliases for installdirs options -sub install_as_core { $_[0]->installdirs('perl') } -sub install_as_cpan { $_[0]->installdirs('site') } -sub install_as_site { $_[0]->installdirs('site') } -sub install_as_vendor { $_[0]->installdirs('vendor') } - -sub dynamic_config { - my $self = shift; - unless ( @_ ) { - warn "You MUST provide an explicit true/false value to dynamic_config\n"; - return $self; - } - $self->{values}->{dynamic_config} = $_[0] ? 1 : 0; - return 1; -} - -sub perl_version { - my $self = shift; - return $self->{values}->{perl_version} unless @_; - my $version = shift or die( - "Did not provide a value to perl_version()" - ); - - # Normalize the version - $version = $self->_perl_version($version); - - # We don't support the reall old versions - unless ( $version >= 5.005 ) { - die "Module::Install only supports 5.005 or newer (use ExtUtils::MakeMaker)\n"; - } - - $self->{values}->{perl_version} = $version; -} - -#Stolen from M::B -my %license_urls = ( - perl => 'http://dev.perl.org/licenses/', - apache => 'http://apache.org/licenses/LICENSE-2.0', - artistic => 'http://opensource.org/licenses/artistic-license.php', - artistic_2 => 'http://opensource.org/licenses/artistic-license-2.0.php', - lgpl => 'http://opensource.org/licenses/lgpl-license.php', - lgpl2 => 'http://opensource.org/licenses/lgpl-2.1.php', - lgpl3 => 'http://opensource.org/licenses/lgpl-3.0.html', - bsd => 'http://opensource.org/licenses/bsd-license.php', - gpl => 'http://opensource.org/licenses/gpl-license.php', - gpl2 => 'http://opensource.org/licenses/gpl-2.0.php', - gpl3 => 'http://opensource.org/licenses/gpl-3.0.html', - mit => 'http://opensource.org/licenses/mit-license.php', - mozilla => 'http://opensource.org/licenses/mozilla1.1.php', - open_source => undef, - unrestricted => undef, - restrictive => undef, - unknown => undef, -); - -sub license { - my $self = shift; - return $self->{values}->{license} unless @_; - my $license = shift or die( - 'Did not provide a value to license()' - ); - $self->{values}->{license} = $license; - - # Automatically fill in license URLs - if ( $license_urls{$license} ) { - $self->resources( license => $license_urls{$license} ); - } - - return 1; -} - -sub all_from { - my ( $self, $file ) = @_; - - unless ( defined($file) ) { - my $name = $self->name or die( - "all_from called with no args without setting name() first" - ); - $file = join('/', 'lib', split(/-/, $name)) . '.pm'; - $file =~ s{.*/}{} unless -e $file; - unless ( -e $file ) { - die("all_from cannot find $file from $name"); - } - } - unless ( -f $file ) { - die("The path '$file' does not exist, or is not a file"); - } - - # Some methods pull from POD instead of code. - # If there is a matching .pod, use that instead - my $pod = $file; - $pod =~ s/\.pm$/.pod/i; - $pod = $file unless -e $pod; - - # Pull the different values - $self->name_from($file) unless $self->name; - $self->version_from($file) unless $self->version; - $self->perl_version_from($file) unless $self->perl_version; - $self->author_from($pod) unless $self->author; - $self->license_from($pod) unless $self->license; - $self->abstract_from($pod) unless $self->abstract; - - return 1; -} - -sub provides { - my $self = shift; - my $provides = ( $self->{values}->{provides} ||= {} ); - %$provides = (%$provides, @_) if @_; - return $provides; -} - -sub auto_provides { - my $self = shift; - return $self unless $self->is_admin; - unless (-e 'MANIFEST') { - warn "Cannot deduce auto_provides without a MANIFEST, skipping\n"; - return $self; - } - # Avoid spurious warnings as we are not checking manifest here. - local $SIG{__WARN__} = sub {1}; - require ExtUtils::Manifest; - local *ExtUtils::Manifest::manicheck = sub { return }; - - require Module::Build; - my $build = Module::Build->new( - dist_name => $self->name, - dist_version => $self->version, - license => $self->license, - ); - $self->provides( %{ $build->find_dist_packages || {} } ); -} - -sub feature { - my $self = shift; - my $name = shift; - my $features = ( $self->{values}->{features} ||= [] ); - my $mods; - - if ( @_ == 1 and ref( $_[0] ) ) { - # The user used ->feature like ->features by passing in the second - # argument as a reference. Accomodate for that. - $mods = $_[0]; - } else { - $mods = \@_; - } - - my $count = 0; - push @$features, ( - $name => [ - map { - ref($_) ? ( ref($_) eq 'HASH' ) ? %$_ : @$_ : $_ - } @$mods - ] - ); - - return @$features; -} - -sub features { - my $self = shift; - while ( my ( $name, $mods ) = splice( @_, 0, 2 ) ) { - $self->feature( $name, @$mods ); - } - return $self->{values}->{features} - ? @{ $self->{values}->{features} } - : (); -} - -sub no_index { - my $self = shift; - my $type = shift; - push @{ $self->{values}->{no_index}->{$type} }, @_ if $type; - return $self->{values}->{no_index}; -} - -sub read { - my $self = shift; - $self->include_deps( 'YAML::Tiny', 0 ); - - require YAML::Tiny; - my $data = YAML::Tiny::LoadFile('META.yml'); - - # Call methods explicitly in case user has already set some values. - while ( my ( $key, $value ) = each %$data ) { - next unless $self->can($key); - if ( ref $value eq 'HASH' ) { - while ( my ( $module, $version ) = each %$value ) { - $self->can($key)->($self, $module => $version ); - } - } else { - $self->can($key)->($self, $value); - } - } - return $self; -} - -sub write { - my $self = shift; - return $self unless $self->is_admin; - $self->admin->write_meta; - return $self; -} - -sub version_from { - require ExtUtils::MM_Unix; - my ( $self, $file ) = @_; - $self->version( ExtUtils::MM_Unix->parse_version($file) ); -} - -sub abstract_from { - require ExtUtils::MM_Unix; - my ( $self, $file ) = @_; - $self->abstract( - bless( - { DISTNAME => $self->name }, - 'ExtUtils::MM_Unix' - )->parse_abstract($file) - ); -} - -# Add both distribution and module name -sub name_from { - my ($self, $file) = @_; - if ( - Module::Install::_read($file) =~ m/ - ^ \s* - package \s* - ([\w:]+) - \s* ; - /ixms - ) { - my ($name, $module_name) = ($1, $1); - $name =~ s{::}{-}g; - $self->name($name); - unless ( $self->module_name ) { - $self->module_name($module_name); - } - } else { - die("Cannot determine name from $file\n"); - } -} - -sub perl_version_from { - my $self = shift; - if ( - Module::Install::_read($_[0]) =~ m/ - ^ - (?:use|require) \s* - v? - ([\d_\.]+) - \s* ; - /ixms - ) { - my $perl_version = $1; - $perl_version =~ s{_}{}g; - $self->perl_version($perl_version); - } else { - warn "Cannot determine perl version info from $_[0]\n"; - return; - } -} - -sub author_from { - my $self = shift; - my $content = Module::Install::_read($_[0]); - if ($content =~ m/ - =head \d \s+ (?:authors?)\b \s* - ([^\n]*) - | - =head \d \s+ (?:licen[cs]e|licensing|copyright|legal)\b \s* - .*? copyright .*? \d\d\d[\d.]+ \s* (?:\bby\b)? \s* - ([^\n]*) - /ixms) { - my $author = $1 || $2; - $author =~ s{E}{<}g; - $author =~ s{E}{>}g; - $self->author($author); - } else { - warn "Cannot determine author info from $_[0]\n"; - } -} - -sub license_from { - my $self = shift; - if ( - Module::Install::_read($_[0]) =~ m/ - ( - =head \d \s+ - (?:licen[cs]e|licensing|copyright|legal)\b - .*? - ) - (=head\\d.*|=cut.*|) - \z - /ixms ) { - my $license_text = $1; - my @phrases = ( - 'under the same (?:terms|license) as (?:perl|the perl programming language) itself' => 'perl', 1, - 'GNU general public license' => 'gpl', 1, - 'GNU public license' => 'gpl', 1, - 'GNU lesser general public license' => 'lgpl', 1, - 'GNU lesser public license' => 'lgpl', 1, - 'GNU library general public license' => 'lgpl', 1, - 'GNU library public license' => 'lgpl', 1, - 'BSD license' => 'bsd', 1, - 'Artistic license' => 'artistic', 1, - 'GPL' => 'gpl', 1, - 'LGPL' => 'lgpl', 1, - 'BSD' => 'bsd', 1, - 'Artistic' => 'artistic', 1, - 'MIT' => 'mit', 1, - 'proprietary' => 'proprietary', 0, - ); - while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) { - $pattern =~ s{\s+}{\\s+}g; - if ( $license_text =~ /\b$pattern\b/i ) { - $self->license($license); - return 1; - } - } - } - - warn "Cannot determine license info from $_[0]\n"; - return 'unknown'; -} - -sub _extract_bugtracker { - my @links = $_[0] =~ m#L<(\Qhttp://rt.cpan.org/\E[^>]+)>#g; - my %links; - @links{@links}=(); - @links=keys %links; - return @links; -} - -sub bugtracker_from { - my $self = shift; - my $content = Module::Install::_read($_[0]); - my @links = _extract_bugtracker($content); - unless ( @links ) { - warn "Cannot determine bugtracker info from $_[0]\n"; - return 0; - } - if ( @links > 1 ) { - warn "Found more than on rt.cpan.org link in $_[0]\n"; - return 0; - } - - # Set the bugtracker - bugtracker( $links[0] ); - return 1; -} - -sub requires_from { - my $self = shift; - my $content = Module::Install::_readperl($_[0]); - my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+([\d\.]+)/mg; - while ( @requires ) { - my $module = shift @requires; - my $version = shift @requires; - $self->requires( $module => $version ); - } -} - -sub test_requires_from { - my $self = shift; - my $content = Module::Install::_readperl($_[0]); - my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+([\d\.]+)/mg; - while ( @requires ) { - my $module = shift @requires; - my $version = shift @requires; - $self->test_requires( $module => $version ); - } -} - -# Convert triple-part versions (eg, 5.6.1 or 5.8.9) to -# numbers (eg, 5.006001 or 5.008009). -# Also, convert double-part versions (eg, 5.8) -sub _perl_version { - my $v = $_[-1]; - $v =~ s/^([1-9])\.([1-9]\d?\d?)$/sprintf("%d.%03d",$1,$2)/e; - $v =~ s/^([1-9])\.([1-9]\d?\d?)\.(0|[1-9]\d?\d?)$/sprintf("%d.%03d%03d",$1,$2,$3 || 0)/e; - $v =~ s/(\.\d\d\d)000$/$1/; - $v =~ s/_.+$//; - if ( ref($v) ) { - # Numify - $v = $v + 0; - } - return $v; -} - - - - - -###################################################################### -# MYMETA Support - -sub WriteMyMeta { - die "WriteMyMeta has been deprecated"; -} - -sub write_mymeta_yaml { - my $self = shift; - - # We need YAML::Tiny to write the MYMETA.yml file - unless ( eval { require YAML::Tiny; 1; } ) { - return 1; - } - - # Generate the data - my $meta = $self->_write_mymeta_data or return 1; - - # Save as the MYMETA.yml file - print "Writing MYMETA.yml\n"; - YAML::Tiny::DumpFile('MYMETA.yml', $meta); -} - -sub write_mymeta_json { - my $self = shift; - - # We need JSON to write the MYMETA.json file - unless ( eval { require JSON; 1; } ) { - return 1; - } - - # Generate the data - my $meta = $self->_write_mymeta_data or return 1; - - # Save as the MYMETA.yml file - print "Writing MYMETA.json\n"; - Module::Install::_write( - 'MYMETA.json', - JSON->new->pretty(1)->canonical->encode($meta), - ); -} - -sub _write_mymeta_data { - my $self = shift; - - # If there's no existing META.yml there is nothing we can do - return undef unless -f 'META.yml'; - - # We need Parse::CPAN::Meta to load the file - unless ( eval { require Parse::CPAN::Meta; 1; } ) { - return undef; - } - - # Merge the perl version into the dependencies - my $val = $self->Meta->{values}; - my $perl = delete $val->{perl_version}; - if ( $perl ) { - $val->{requires} ||= []; - my $requires = $val->{requires}; - - # Canonize to three-dot version after Perl 5.6 - if ( $perl >= 5.006 ) { - $perl =~ s{^(\d+)\.(\d\d\d)(\d*)}{join('.', $1, int($2||0), int($3||0))}e - } - unshift @$requires, [ perl => $perl ]; - } - - # Load the advisory META.yml file - my @yaml = Parse::CPAN::Meta::LoadFile('META.yml'); - my $meta = $yaml[0]; - - # Overwrite the non-configure dependency hashs - delete $meta->{requires}; - delete $meta->{build_requires}; - delete $meta->{recommends}; - if ( exists $val->{requires} ) { - $meta->{requires} = { map { @$_ } @{ $val->{requires} } }; - } - if ( exists $val->{build_requires} ) { - $meta->{build_requires} = { map { @$_ } @{ $val->{build_requires} } }; - } - - return $meta; -} - -1; diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Win32.pm /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Win32.pm --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Win32.pm 2010-01-12 16:28:21.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/Win32.pm 1970-01-01 09:00:00.000000000 +0900 @@ -1,64 +0,0 @@ -#line 1 -package Module::Install::Win32; - -use strict; -use Module::Install::Base (); - -use vars qw{$VERSION @ISA $ISCORE}; -BEGIN { - $VERSION = '0.91'; - @ISA = 'Module::Install::Base'; - $ISCORE = 1; -} - -# determine if the user needs nmake, and download it if needed -sub check_nmake { - my $self = shift; - $self->load('can_run'); - $self->load('get_file'); - - require Config; - return unless ( - $^O eq 'MSWin32' and - $Config::Config{make} and - $Config::Config{make} =~ /^nmake\b/i and - ! $self->can_run('nmake') - ); - - print "The required 'nmake' executable not found, fetching it...\n"; - - require File::Basename; - my $rv = $self->get_file( - url => 'http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe', - ftp_url => 'ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe', - local_dir => File::Basename::dirname($^X), - size => 51928, - run => 'Nmake15.exe /o > nul', - check_for => 'Nmake.exe', - remove => 1, - ); - - die <<'END_MESSAGE' unless $rv; - -------------------------------------------------------------------------------- - -Since you are using Microsoft Windows, you will need the 'nmake' utility -before installation. It's available at: - - http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe - or - ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe - -Please download the file manually, save it to a directory in %PATH% (e.g. -C:\WINDOWS\COMMAND\), then launch the MS-DOS command line shell, "cd" to -that directory, and run "Nmake15.exe" from there; that will create the -'nmake.exe' file needed by this module. - -You may then resume the installation process described in README. - -------------------------------------------------------------------------------- -END_MESSAGE - -} - -1; diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/WriteAll.pm /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/WriteAll.pm --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/WriteAll.pm 2010-01-12 16:28:21.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install/WriteAll.pm 1970-01-01 09:00:00.000000000 +0900 @@ -1,60 +0,0 @@ -#line 1 -package Module::Install::WriteAll; - -use strict; -use Module::Install::Base (); - -use vars qw{$VERSION @ISA $ISCORE}; -BEGIN { - $VERSION = '0.91';; - @ISA = qw{Module::Install::Base}; - $ISCORE = 1; -} - -sub WriteAll { - my $self = shift; - my %args = ( - meta => 1, - sign => 0, - inline => 0, - check_nmake => 1, - @_, - ); - - $self->sign(1) if $args{sign}; - $self->admin->WriteAll(%args) if $self->is_admin; - - $self->check_nmake if $args{check_nmake}; - unless ( $self->makemaker_args->{PL_FILES} ) { - $self->makemaker_args( PL_FILES => {} ); - } - - # Until ExtUtils::MakeMaker support MYMETA.yml, make sure - # we clean it up properly ourself. - $self->realclean_files('MYMETA.yml'); - - if ( $args{inline} ) { - $self->Inline->write; - } else { - $self->Makefile->write; - } - - # The Makefile write process adds a couple of dependencies, - # so write the META.yml files after the Makefile. - if ( $args{meta} ) { - $self->Meta->write; - } - - # Experimental support for MYMETA - if ( $ENV{X_MYMETA} ) { - if ( $ENV{X_MYMETA} eq 'JSON' ) { - $self->Meta->write_mymeta_json; - } else { - $self->Meta->write_mymeta_yaml; - } - } - - return 1; -} - -1; diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install.pm /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install.pm --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install.pm 2010-01-12 16:28:20.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/inc/Module/Install.pm 1970-01-01 09:00:00.000000000 +0900 @@ -1,430 +0,0 @@ -#line 1 -package Module::Install; - -# For any maintainers: -# The load order for Module::Install is a bit magic. -# It goes something like this... -# -# IF ( host has Module::Install installed, creating author mode ) { -# 1. Makefile.PL calls "use inc::Module::Install" -# 2. $INC{inc/Module/Install.pm} set to installed version of inc::Module::Install -# 3. The installed version of inc::Module::Install loads -# 4. inc::Module::Install calls "require Module::Install" -# 5. The ./inc/ version of Module::Install loads -# } ELSE { -# 1. Makefile.PL calls "use inc::Module::Install" -# 2. $INC{inc/Module/Install.pm} set to ./inc/ version of Module::Install -# 3. The ./inc/ version of Module::Install loads -# } - -use 5.005; -use strict 'vars'; - -use vars qw{$VERSION $MAIN}; -BEGIN { - # All Module::Install core packages now require synchronised versions. - # This will be used to ensure we don't accidentally load old or - # different versions of modules. - # This is not enforced yet, but will be some time in the next few - # releases once we can make sure it won't clash with custom - # Module::Install extensions. - $VERSION = '0.91'; - - # Storage for the pseudo-singleton - $MAIN = undef; - - *inc::Module::Install::VERSION = *VERSION; - @inc::Module::Install::ISA = __PACKAGE__; - -} - - - - - -# Whether or not inc::Module::Install is actually loaded, the -# $INC{inc/Module/Install.pm} is what will still get set as long as -# the caller loaded module this in the documented manner. -# If not set, the caller may NOT have loaded the bundled version, and thus -# they may not have a MI version that works with the Makefile.PL. This would -# result in false errors or unexpected behaviour. And we don't want that. -my $file = join( '/', 'inc', split /::/, __PACKAGE__ ) . '.pm'; -unless ( $INC{$file} ) { die <<"END_DIE" } - -Please invoke ${\__PACKAGE__} with: - - use inc::${\__PACKAGE__}; - -not: - - use ${\__PACKAGE__}; - -END_DIE - - - - - -# If the script that is loading Module::Install is from the future, -# then make will detect this and cause it to re-run over and over -# again. This is bad. Rather than taking action to touch it (which -# is unreliable on some platforms and requires write permissions) -# for now we should catch this and refuse to run. -if ( -f $0 ) { - my $s = (stat($0))[9]; - - # If the modification time is only slightly in the future, - # sleep briefly to remove the problem. - my $a = $s - time; - if ( $a > 0 and $a < 5 ) { sleep 5 } - - # Too far in the future, throw an error. - my $t = time; - if ( $s > $t ) { die <<"END_DIE" } - -Your installer $0 has a modification time in the future ($s > $t). - -This is known to create infinite loops in make. - -Please correct this, then run $0 again. - -END_DIE -} - - - - - -# Build.PL was formerly supported, but no longer is due to excessive -# difficulty in implementing every single feature twice. -if ( $0 =~ /Build.PL$/i ) { die <<"END_DIE" } - -Module::Install no longer supports Build.PL. - -It was impossible to maintain duel backends, and has been deprecated. - -Please remove all Build.PL files and only use the Makefile.PL installer. - -END_DIE - - - - - -# To save some more typing in Module::Install installers, every... -# use inc::Module::Install -# ...also acts as an implicit use strict. -$^H |= strict::bits(qw(refs subs vars)); - - - - - -use Cwd (); -use File::Find (); -use File::Path (); -use FindBin; - -sub autoload { - my $self = shift; - my $who = $self->_caller; - my $cwd = Cwd::cwd(); - my $sym = "${who}::AUTOLOAD"; - $sym->{$cwd} = sub { - my $pwd = Cwd::cwd(); - if ( my $code = $sym->{$pwd} ) { - # Delegate back to parent dirs - goto &$code unless $cwd eq $pwd; - } - $$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym"; - my $method = $1; - if ( uc($method) eq $method ) { - # Do nothing - return; - } elsif ( $method =~ /^_/ and $self->can($method) ) { - # Dispatch to the root M:I class - return $self->$method(@_); - } - - # Dispatch to the appropriate plugin - unshift @_, ( $self, $1 ); - goto &{$self->can('call')}; - }; -} - -sub import { - my $class = shift; - my $self = $class->new(@_); - my $who = $self->_caller; - - unless ( -f $self->{file} ) { - require "$self->{path}/$self->{dispatch}.pm"; - File::Path::mkpath("$self->{prefix}/$self->{author}"); - $self->{admin} = "$self->{name}::$self->{dispatch}"->new( _top => $self ); - $self->{admin}->init; - @_ = ($class, _self => $self); - goto &{"$self->{name}::import"}; - } - - *{"${who}::AUTOLOAD"} = $self->autoload; - $self->preload; - - # Unregister loader and worker packages so subdirs can use them again - delete $INC{"$self->{file}"}; - delete $INC{"$self->{path}.pm"}; - - # Save to the singleton - $MAIN = $self; - - return 1; -} - -sub preload { - my $self = shift; - unless ( $self->{extensions} ) { - $self->load_extensions( - "$self->{prefix}/$self->{path}", $self - ); - } - - my @exts = @{$self->{extensions}}; - unless ( @exts ) { - @exts = $self->{admin}->load_all_extensions; - } - - my %seen; - foreach my $obj ( @exts ) { - while (my ($method, $glob) = each %{ref($obj) . '::'}) { - next unless $obj->can($method); - next if $method =~ /^_/; - next if $method eq uc($method); - $seen{$method}++; - } - } - - my $who = $self->_caller; - foreach my $name ( sort keys %seen ) { - *{"${who}::$name"} = sub { - ${"${who}::AUTOLOAD"} = "${who}::$name"; - goto &{"${who}::AUTOLOAD"}; - }; - } -} - -sub new { - my ($class, %args) = @_; - - # ignore the prefix on extension modules built from top level. - my $base_path = Cwd::abs_path($FindBin::Bin); - unless ( Cwd::abs_path(Cwd::cwd()) eq $base_path ) { - delete $args{prefix}; - } - - return $args{_self} if $args{_self}; - - $args{dispatch} ||= 'Admin'; - $args{prefix} ||= 'inc'; - $args{author} ||= ($^O eq 'VMS' ? '_author' : '.author'); - $args{bundle} ||= 'inc/BUNDLES'; - $args{base} ||= $base_path; - $class =~ s/^\Q$args{prefix}\E:://; - $args{name} ||= $class; - $args{version} ||= $class->VERSION; - unless ( $args{path} ) { - $args{path} = $args{name}; - $args{path} =~ s!::!/!g; - } - $args{file} ||= "$args{base}/$args{prefix}/$args{path}.pm"; - $args{wrote} = 0; - - bless( \%args, $class ); -} - -sub call { - my ($self, $method) = @_; - my $obj = $self->load($method) or return; - splice(@_, 0, 2, $obj); - goto &{$obj->can($method)}; -} - -sub load { - my ($self, $method) = @_; - - $self->load_extensions( - "$self->{prefix}/$self->{path}", $self - ) unless $self->{extensions}; - - foreach my $obj (@{$self->{extensions}}) { - return $obj if $obj->can($method); - } - - my $admin = $self->{admin} or die <<"END_DIE"; -The '$method' method does not exist in the '$self->{prefix}' path! -Please remove the '$self->{prefix}' directory and run $0 again to load it. -END_DIE - - my $obj = $admin->load($method, 1); - push @{$self->{extensions}}, $obj; - - $obj; -} - -sub load_extensions { - my ($self, $path, $top) = @_; - - unless ( grep { ! ref $_ and lc $_ eq lc $self->{prefix} } @INC ) { - unshift @INC, $self->{prefix}; - } - - foreach my $rv ( $self->find_extensions($path) ) { - my ($file, $pkg) = @{$rv}; - next if $self->{pathnames}{$pkg}; - - local $@; - my $new = eval { require $file; $pkg->can('new') }; - unless ( $new ) { - warn $@ if $@; - next; - } - $self->{pathnames}{$pkg} = delete $INC{$file}; - push @{$self->{extensions}}, &{$new}($pkg, _top => $top ); - } - - $self->{extensions} ||= []; -} - -sub find_extensions { - my ($self, $path) = @_; - - my @found; - File::Find::find( sub { - my $file = $File::Find::name; - return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is; - my $subpath = $1; - return if lc($subpath) eq lc($self->{dispatch}); - - $file = "$self->{path}/$subpath.pm"; - my $pkg = "$self->{name}::$subpath"; - $pkg =~ s!/!::!g; - - # If we have a mixed-case package name, assume case has been preserved - # correctly. Otherwise, root through the file to locate the case-preserved - # version of the package name. - if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) { - my $content = Module::Install::_read($subpath . '.pm'); - my $in_pod = 0; - foreach ( split //, $content ) { - $in_pod = 1 if /^=\w/; - $in_pod = 0 if /^=cut/; - next if ($in_pod || /^=cut/); # skip pod text - next if /^\s*#/; # and comments - if ( m/^\s*package\s+($pkg)\s*;/i ) { - $pkg = $1; - last; - } - } - } - - push @found, [ $file, $pkg ]; - }, $path ) if -d $path; - - @found; -} - - - - - -##################################################################### -# Common Utility Functions - -sub _caller { - my $depth = 0; - my $call = caller($depth); - while ( $call eq __PACKAGE__ ) { - $depth++; - $call = caller($depth); - } - return $call; -} - -sub _read { - local *FH; - if ( $] >= 5.006 ) { - open( FH, '<', $_[0] ) or die "open($_[0]): $!"; - } else { - open( FH, "< $_[0]" ) or die "open($_[0]): $!"; - } - my $string = do { local $/; }; - close FH or die "close($_[0]): $!"; - return $string; -} - -sub _readperl { - my $string = Module::Install::_read($_[0]); - $string =~ s/(?:\015{1,2}\012|\015|\012)/\n/sg; - $string =~ s/(\n)\n*__(?:DATA|END)__\b.*\z/$1/s; - $string =~ s/\n\n=\w+.+?\n\n=cut\b.+?\n+/\n\n/sg; - return $string; -} - -sub _readpod { - my $string = Module::Install::_read($_[0]); - $string =~ s/(?:\015{1,2}\012|\015|\012)/\n/sg; - return $string if $_[0] =~ /\.pod\z/; - $string =~ s/(^|\n=cut\b.+?\n+)[^=\s].+?\n(\n=\w+|\z)/$1$2/sg; - $string =~ s/\n*=pod\b[^\n]*\n+/\n\n/sg; - $string =~ s/\n*=cut\b[^\n]*\n+/\n\n/sg; - $string =~ s/^\n+//s; - return $string; -} - -sub _write { - local *FH; - if ( $] >= 5.006 ) { - open( FH, '>', $_[0] ) or die "open($_[0]): $!"; - } else { - open( FH, "> $_[0]" ) or die "open($_[0]): $!"; - } - foreach ( 1 .. $#_ ) { - print FH $_[$_] or die "print($_[0]): $!"; - } - close FH or die "close($_[0]): $!"; -} - -# _version is for processing module versions (eg, 1.03_05) not -# Perl versions (eg, 5.8.1). -sub _version ($) { - my $s = shift || 0; - my $d =()= $s =~ /(\.)/g; - if ( $d >= 2 ) { - # Normalise multipart versions - $s =~ s/(\.)(\d{1,3})/sprintf("$1%03d",$2)/eg; - } - $s =~ s/^(\d+)\.?//; - my $l = $1 || 0; - my @v = map { - $_ . '0' x (3 - length $_) - } $s =~ /(\d{1,3})\D?/g; - $l = $l . '.' . join '', @v if @v; - return $l + 0; -} - -sub _cmp ($$) { - _version($_[0]) <=> _version($_[1]); -} - -# Cloned from Params::Util::_CLASS -sub _CLASS ($) { - ( - defined $_[0] - and - ! ref $_[0] - and - $_[0] =~ m/^[^\W\d]\w*(?:::\w+)*\z/s - ) ? $_[0] : undef; -} - -1; - -# Copyright 2008 - 2009 Adam Kennedy. diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/lib/Test/Module/Used.pm /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/lib/Test/Module/Used.pm --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/lib/Test/Module/Used.pm 2010-01-12 16:27:51.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/lib/Test/Module/Used.pm 1970-01-01 09:00:00.000000000 +0900 @@ -1,457 +0,0 @@ -package Test::Module::Used; -use base qw(Exporter); -use strict; -use warnings; -use File::Find; -use File::Spec::Functions qw(catfile); -use Module::Used qw(modules_used_in_document); -use Module::CoreList; -use YAML; -use Test::Builder; -use List::MoreUtils qw(any); -use PPI::Document; -use version; - -use 5.008; -our $VERSION = '0.1.8'; - -=head1 NAME - -Test::Module::Used - Test required module is really used and vice versa bitween lib/t and META.yml - -=head1 SYNOPSIS - - #!/usr/bin/perl -w - use strict; - use warnings; - use Test::Module::Used; - my $used = Test::Module::Used->new(); - $used->ok; - - -=head1 DESCRIPTION - -Test dependency between module and META.yml. - -This module reads I and get I and I. It compares required module is really used and used module is really required. - -=cut - -=head1 Important changes - -Some behavier changed since 0.1.3_01. - -=over 4 - -=item * perl_version set in constructor is prior to use, and read version from META.yml(not read from use statement in *.pm) - -=item * deprecated interfaces are deleted. (module_dir, test_module_dir, exclude_in_moduledir and push_exclude_in_moduledir) - -=back - -=cut - -=head1 methods - -=cut - -=head2 new - -create new instance - -all parameters are passed by hash-style, and optional. - -in ordinary use. - - my $used = Test::Module::Used->new(); - $used->ok(); - -all parameters are as follows.(specified values are default, except I) - - my $used = Test::Module::Used->new( - test_dir => ['t'], # directory(ies) which contains test scripts. - lib_dir => ['lib'], # directory(ies) which contains module libs. - test_lib_dir => ['t'], # directory(ies) which contains libs used ONLY in test (ex. MockObject for test) - meta_file => 'META.yml', # META.yml (contains module requirement information) - perl_version => '5.008', # expected perl version which is used for ignore core-modules in testing - exclude_in_testdir => [], # ignored module(s) for test even if it is used. - exclude_in_libdir => [], # ignored module(s) for your lib even if it is used. - exclude_in_build_requires => [], # ignored module(s) even if it is written in build_requires of META.yml. - exclude_in_requires => [], # ignored module(s) even if it is written in requires of META.yml. - ); - -if perl_version is not passed in constructor, this modules reads I and get perl version. - -I is automatically set by default. This module reads I and parse "pacakge" statement, then found "package" statements and myself(Test::Module::Used) is set. -I is also automatically set by default. This module reads I and parse "package" statement, found "package" statement are set.(Test::Module::Used isnt included) - -=cut - -sub new { - my $class = shift; - my (%opt) = @_; - my $self = { - test_dir => $opt{test_dir} || ['t'], - lib_dir => $opt{lib_dir} || ['lib'], - test_lib_dir => $opt{test_lib_dir} || ['t'], - meta_file => $opt{meta_file} || 'META.yml', - perl_version => $opt{perl_version}, - exclude_in_testdir => $opt{exclude_in_testdir}, - exclude_in_libdir => $opt{exclude_in_libdir}, - exclude_in_build_requires => $opt{exclude_in_build_requires} || [], - exclude_in_requires => $opt{exclude_in_requires} || [], - }; - bless $self, $class; - $self->_get_packages(); - return $self; -} - - -sub _test_dir { - return shift->{test_dir}; -} - -sub _lib_dir { - return shift->{lib_dir}; -} - -sub _test_lib_dir { - return shift->{test_lib_dir}; -} - -sub _meta_file { - return shift->{meta_file}; -} - -sub _perl_version { - return shift->{perl_version}; -} - -=head2 ok - -check used module is ok. - - my $used = Test::Module::Used->new( - exclude_in_testdir => ['Test::Module::Used', 'My::Module'], - ); - $used->ok; - - -First, This module reads I and get I and I. Next, reads module directory (by default I) and test directory(by default I), and compare required module is really used and used module is really required. If all these requirement information is OK, test will success. - -=cut - -sub ok { - my $self = shift; - my $test = Test::Builder->new(); - - - my $num_tests = $self->_num_tests(); - if ( $num_tests > 0 ) { - $test->plan(tests => $num_tests); - my $status_requires_ok = $self->_requires_ok($test, - [$self->_remove_core($self->_used_modules)], - [$self->_remove_core($self->_requires)], - "lib"); - my $status_build_requires_ok = $self->_requires_ok($test, - [$self->_remove_core($self->_used_modules_in_test)], - [$self->_remove_core($self->_build_requires)], - "test"); - return $status_requires_ok && $status_build_requires_ok; - } - else { - $test->plan(tests => 1); - $test->ok(1, "no tests run"); - return 1; - } -} - -=head2 push_exclude_in_libdir( @exclude_module_names ) - -add ignored module(s) for your module(lib) even if it is used after new()'ed. -this is usable if you want to use auto set feature for I but manually specify exclude modules. - -For example, - - my $used = Test::Module::Used->new(); #automatically set exclude_in_libdir - $used->push_exclude_in_libdir( qw(Some::Module::Which::You::Want::To::Exclude) );#module(s) which you want to exclude - $used->ok(); #do test - -=cut - -sub push_exclude_in_libdir { - my $self = shift; - my @exclude_module_names = @_; - push @{$self->{exclude_in_libdir}},@exclude_module_names; -} - - - -=head2 push_exclude_in_testdir( @exclude_module_names ) - -add ignored module(s) for test even if it is used after new()'ed. -this is usable if you want to use auto set feature for I but manually specify exclude modules. - -For example, - - my $used = Test::Module::Used->new(); #automatically set exclude_in_testdir - $used->push_exclude_in_testdir( qw(Some::Module::Which::You::Want::To::Exclude) );#module(s) which you want to exclude - $used->ok(); #do test - -=cut - -sub push_exclude_in_testdir { - my $self = shift; - my @exclude_module_names = @_; - push @{$self->{exclude_in_testdir}},@exclude_module_names; -} - -sub _version { - my $self = shift; - if ( !defined $self->{version} ) { - $self->{version} = $self->_perl_version || $self->_version_from_meta || "5.008000"; - } - return $self->{version}; -} - -sub _num_tests { - my $self = shift; - - return scalar($self->_remove_core($self->_used_modules, - $self->_requires, - $self->_used_modules_in_test, - $self->_build_requires)); -} - -sub _requires_ok { - my $self = shift; - my ($test, $used_aref, $requires_aref, $place) = @_; - - my $status1 = $self->_check_required_but_not_used($test, $requires_aref, $used_aref, $place); - my $status2 = $self->_check_used_but_not_required($test, $requires_aref, $used_aref, $place); - - return $status1 && $status2; -} - - -sub _check_required_but_not_used { - my $self = shift; - my ($test, $requires_aref, $used_aref, $place) = @_; - my @requires = @{$requires_aref}; - my @used = @{$used_aref}; - - my $result = 1; - for my $require ( @requires ) { - my $status = any { $_ eq $require } @used; - $test->ok( $status, "check required module: $require" ); - if ( !$status ) { - $test->diag("module $require is required but not used in $place"); - $result = 0; - } - } - return $result; -} - -sub _check_used_but_not_required { - my $self = shift; - my ($test, $requires_aref, $used_aref, $place) = @_; - my @requires = @{$requires_aref}; - my @used = @{$used_aref}; - - my $result = 1; - for my $used ( @used ) { - my $status = any { $_ eq $used } @requires; - $test->ok( $status, "check used module: $used" ); - if ( !$status ) { - $test->diag("module $used is used in $place but not required"); - $result = 0; - } - } - return $result; -} - -sub _pm_files { - my $self = shift; - if ( !defined $self->{pm_files} ) { - my @files = $self->_find_files_by_ext($self->_lib_dir, qr/\.pm$/); - $self->{pm_files} = \@files; - } - return @{$self->{pm_files}}; -} - -sub _pm_files_in_test { - my $self = shift; - if ( !defined $self->{pm_files_in_test} ) { - my @files = $self->_find_files_by_ext($self->_test_lib_dir, qr/\.pm$/); - $self->{pm_files_in_test} = \@files; - } - return @{$self->{pm_files_in_test}}; -} - -sub _test_files { - my $self = shift; - return $self->_find_files_by_ext($self->_test_dir, qr/\.t$/); -} - -sub _find_files_by_ext { - my $self = shift; - my ($start_dirs_aref, $ext_qr) = @_; - my @result; - find( sub { - push @result, catfile($File::Find::dir, $_) if ( $_ =~ $ext_qr ); - }, - @{$start_dirs_aref}); - return @result; -} - -sub _used_modules { - my $self = shift; - if ( !defined $self->{used_modules} ) { - my @used = map { modules_used_in_document($self->_ppi_for($_)) } $self->_pm_files; - my @result = _array_difference(\@used, $self->{exclude_in_libdir}); - $self->{used_modules} = \@result; - } - return @{$self->{used_modules}}; -} - -sub _used_modules_in_test { - my $self = shift; - if ( !defined $self->{used_modules_in_test} ) { - my @used = map { modules_used_in_document($self->_ppi_for($_)) } $self->_test_files; - my @result = _array_difference(\@used, $self->{exclude_in_testdir}); - $self->{used_modules_in_test} = \@result; - } - return @{$self->{used_modules_in_test}}; -} - -sub _array_difference { - my ( $aref1, $aref2 ) = @_; - my @a1 = @{$aref1}; - my @a2 = @{$aref2}; - - for my $a2 ( @a2 ) { - @a1 = grep { $_ ne $a2 } @a1; - } - return @a1; -} - -sub _version_from_meta { - my $self = shift; - return $self->{version_from_meta}; -} - -sub _remove_core { - my $self = shift; - my( @module_names ) = @_; - my @result = grep { !$self->_is_core_module($_) } @module_names; - return @result; -} - -sub _is_core_module { - my $self = shift; - my($module_name) = @_; - my $first_release = Module::CoreList->first_release($module_name); - return defined $first_release && $first_release <= $self->_version; -} - -sub _read_meta_yml { - my $self = shift; - my $yaml = YAML::LoadFile( $self->_meta_file ); - $self->{build_requires} = $yaml->{build_requires}; - $self->{version_from_meta} = version->parse($yaml->{requires}->{perl})->numify() if defined $yaml->{requires}->{perl}; - delete $yaml->{requires}->{perl}; - $self->{requires} = $yaml->{requires}; -} - -sub _build_requires { - my $self = shift; - - $self->_read_meta_yml if !defined $self->{build_requires}; - my @result = sort keys %{$self->{build_requires}}; - return _array_difference(\@result, $self->{exclude_in_build_requires}); -} - -sub _requires { - my $self = shift; - - $self->_read_meta_yml if !defined $self->{requires}; - my @result = sort keys %{$self->{requires}}; - return _array_difference(\@result, $self->{exclude_in_requires}); -} - -# find package statements in lib -sub _get_packages { - my $self = shift; - my @packages = $self->_packages_in( $self->_pm_files ); - my @exclude_in_testdir = (__PACKAGE__, @packages, $self->_packages_in($self->_pm_files_in_test)); - $self->push_exclude_in_testdir(@exclude_in_testdir) if ( !defined $self->{exclude_in_testdir} ); - $self->push_exclude_in_libdir(@packages) if ( !defined $self->{exclude_in_libdir} ); -} - -sub _packages_in { - my $self = shift; - my ( @filenames ) = @_; - - my @result; - for my $filename ( @filenames ) { - my @packages = $self->_packages_in_file($filename); - push @result, @packages; - } - return @result; -} - -sub _packages_in_file { - my $self = shift; - my ( $filename ) = @_; - - my $doc = $self->_ppi_for($filename); - my $packages = $doc->find('PPI::Statement::Package'); - return if ( $packages eq '' ); - - my @result; - for my $item ( @{$packages} ) { - for my $token ( @{$item->{children}} ) { - next if ( !$token->isa('PPI::Token::Word') ); - next if ( $token->content eq 'package' ); - push @result, $token->content; - } - } - return @result; -} - -# PPI::Document object for $filename -sub _ppi_for { - my $self = shift; - my ($filename) = @_; - if ( !defined $self->{ppi_for}->{$filename} ) { - my $doc = PPI::Document->new($filename); - $self->{ppi_for}->{$filename} = $doc; - } - return $self->{ppi_for}->{$filename}; -} - - -1; -__END__ - -=head1 AUTHOR - -Takuya Tsuchida Etsucchi@cpan.orgE - -=head1 SEE ALSO - -L has almost same feature. - -=head1 REPOSITORY - -L - - -=head1 COPYRIGHT AND LICENSE - -Copyright (c) 2008-2010 Takuya Tsuchida - -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. - -=cut diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/001_use_ok.t /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/001_use_ok.t --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/001_use_ok.t 2009-11-20 15:52:56.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/001_use_ok.t 1970-01-01 09:00:00.000000000 +0900 @@ -1,7 +0,0 @@ -#!/usr/bin/perl -use strict; -use warnings; -use Test::More tests=>1; - -BEGIN { use_ok('Test::Module::Used') }; - diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/002_default.t /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/002_default.t --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/002_default.t 2009-12-24 11:20:27.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/002_default.t 1970-01-01 09:00:00.000000000 +0900 @@ -1,12 +0,0 @@ -#!/usr/bin/perl -w -use strict; -use warnings; -use Test::More tests => 4; -use Test::Module::Used; - -my $used = Test::Module::Used->new(); - -is_deeply($used->_test_dir, ['t']);#default directory for test -is_deeply($used->_lib_dir, ['lib']); -is($used->_meta_file, 'META.yml'); -is($used->_version, '5.008000'); diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/003_option.t /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/003_option.t --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/003_option.t 2009-12-24 11:22:35.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/003_option.t 1970-01-01 09:00:00.000000000 +0900 @@ -1,20 +0,0 @@ -#!/usr/bin/perl -w -use strict; -use warnings; -use Test::More tests=> 5; -use Test::Module::Used; -use File::Spec::Functions qw(catfile); - -my $used = Test::Module::Used->new( - test_dir => ['t', 'xt'], - lib_dir => ['lib', catfile('testdata', 'lib')], - meta_file => 'Meta.yml', - perl_version => '5.010', -); - -is_deeply($used->_test_dir, ['t', 'xt']); -is_deeply($used->_lib_dir, ['lib', catfile('testdata', 'lib')]); -is($used->_meta_file, 'Meta.yml'); -is($used->_perl_version, '5.010'); -is($used->_version, '5.010'); - diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/004_used_ok.t /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/004_used_ok.t --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/004_used_ok.t 2009-12-09 13:57:24.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/004_used_ok.t 1970-01-01 09:00:00.000000000 +0900 @@ -1,14 +0,0 @@ -#!/usr/bin/perl -w -use strict; -use warnings; -use Test::Module::Used; -use File::Spec::Functions qw(catfile); - -my $used = Test::Module::Used->new( - lib_dir => [catfile('testdata', 'lib')], - test_dir => [catfile('testdata', 't')], - meta_file => catfile('testdata', 'META.yml2'), - exclude_in_testdir => ['SampleModule'], -); - -$used->ok; diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/005_used_module.t /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/005_used_module.t --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/005_used_module.t 2009-12-24 11:19:01.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/005_used_module.t 1970-01-01 09:00:00.000000000 +0900 @@ -1,42 +0,0 @@ -#!/usr/bin/perl -w -use strict; -use warnings; -use Test::More tests=>10; -use File::Spec::Functions qw(catfile); -use Test::Module::Used; - -my $used = Test::Module::Used->new( - lib_dir => [catfile('testdata', 'lib')], - test_dir => [catfile('testdata', 't')], - perl_version => '5.008', -); -is_deeply([$used->_pm_files], [catfile('testdata', 'lib', 'SampleModule.pm')]); -is_deeply([$used->_test_files], [catfile('testdata', 't', '001_test.t')]); -is_deeply([$used->_used_modules()], [qw(Net::FTP Module::Used Test::Module::Used)]); -is_deeply([$used->_used_modules_in_test()], [qw(Test::More Test::Class)]);# SampleModule is ignored -is($used->_version, '5.008');# used version - -is_deeply( [$used->_remove_core(qw(Module::Used Net::FTP Test::Module::Used))], - ['Module::Used', 'Test::Module::Used'] ); - - - -# exclude -my $used2 = Test::Module::Used->new( - lib_dir => [catfile('testdata', 'lib')], - test_dir => [catfile('testdata', 't')], - exclude_in_libdir => ['Module::Used'], - exclude_in_testdir => ['Test::Class'], -); -is_deeply([$used2->_used_modules()], [qw(Net::FTP Test::Module::Used)]); -is_deeply([$used2->_used_modules_in_test()], [qw(Test::More SampleModule)]); - -# exclude after constructed -my $used3 = Test::Module::Used->new( - lib_dir => [catfile('testdata', 'lib')], - test_dir => [catfile('testdata', 't')], -); -$used3->push_exclude_in_libdir(qw(Module::Used Net::FTP)); -is_deeply([$used3->_used_modules()], [qw(Test::Module::Used)]); -$used3->push_exclude_in_testdir( qw(Test::More Test::Class) ); -is_deeply([$used3->_used_modules_in_test()], []); diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/006_read_meta_yml.t /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/006_read_meta_yml.t --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/006_read_meta_yml.t 2009-12-24 11:22:03.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/006_read_meta_yml.t 1970-01-01 09:00:00.000000000 +0900 @@ -1,44 +0,0 @@ -#!/usr/bin/perl -w -use strict; -use warnings; -use Test::More tests=>8; -use Test::Module::Used; -use File::Spec::Functions qw(catfile); - -my $used = Test::Module::Used->new( - meta_file => catfile('testdata', 'META.yml'), -); -$used->_read_meta_yml(); -is_deeply( [$used->_build_requires()], - ['ExtUtils::MakeMaker', 'Test::More'] ); - -is_deeply( [$used->_requires()], - ['Module::Used', 'PPI::Document'] );#perl 5.8.0 isn't return -is($used->_version_from_meta(), "5.008000"); -is($used->_version, "5.008000"); - -my $used2 = Test::Module::Used->new( - meta_file => catfile('testdata', 'META.yml2'), -); -$used2->_read_meta_yml(); -is_deeply( [$used2->_build_requires()], - ['ExtUtils::MakeMaker', 'Test::Class', 'Test::More' ] ); - -is_deeply( [$used2->_requires()], - ['Module::Used', 'Test::Module::Used'] );#perl 5.8.0 isn't return - - -# exclude -my $used3 = Test::Module::Used->new( - meta_file => catfile('testdata', 'META.yml2'), - exclude_in_build_requires => ['Test::Class'], - exclude_in_requires => ['Module::Used'], -); -$used3->_read_meta_yml(); -is_deeply( [$used3->_build_requires()], - ['ExtUtils::MakeMaker', 'Test::More' ] ); - -is_deeply( [$used3->_requires()], - ['Test::Module::Used'] );#perl 5.8.0 isn't return - - diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/007_test_myself.t /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/007_test_myself.t --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/007_test_myself.t 2009-12-02 16:34:04.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/007_test_myself.t 1970-01-01 09:00:00.000000000 +0900 @@ -1,10 +0,0 @@ -#!/usr/bin/perl -w -use strict; -use warnings; - -use Test::Module::Used; - -my $used = Test::Module::Used->new( - exclude_in_testdir => ['Test::Module::Used'], -); -$used->ok; diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/008_test_is_empty.t /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/008_test_is_empty.t --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/008_test_is_empty.t 2009-12-09 13:58:50.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/008_test_is_empty.t 1970-01-01 09:00:00.000000000 +0900 @@ -1,14 +0,0 @@ -#!/usr/bin/perl -w -use strict; -use warnings; -use Test::Module::Used; -use File::Spec::Functions qw(catfile); - -my $used = Test::Module::Used->new( - test_dir => [catfile('testdata', 't2')], - lib_dir => [catfile('testdata', 'lib2')], - meta_file => catfile('testdata', 'META.yml3'), - exclude_in_testdir => ['Test::Module::Used'], -); - -$used->ok; diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/009_auto_get_exclude.t /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/009_auto_get_exclude.t --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/009_auto_get_exclude.t 2009-12-09 18:40:47.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/009_auto_get_exclude.t 1970-01-01 09:00:00.000000000 +0900 @@ -1,33 +0,0 @@ -#!/usr/bin/perl -w -use strict; -use warnings; -use Test::More tests => 7; -use Test::Module::Used; -use File::Spec::Functions qw(catfile); - -my $used = Test::Module::Used->new( - test_dir => [catfile('testdata', 't2')], - lib_dir => [catfile('testdata', 'lib2')], - meta_file => catfile('testdata', 'META.yml3'), -); - - -is_deeply([$used->_packages_in($used->_pm_files)], ['My::Test']); -$used->_get_packages; -is_deeply($used->{exclude_in_testdir}, ['Test::Module::Used', 'My::Test']); -is_deeply($used->{exclude_in_libdir}, ['My::Test']); - -my $used1 = Test::Module::Used->new( - test_dir => [catfile('testdata', 't2')], - lib_dir => [catfile('testdata', 'lib2')], - test_lib_dir => [catfile('testdata', 't2', 'lib')], - meta_file => catfile('testdata', 'META.yml3'), -); - -is_deeply([$used1->_packages_in($used1->_pm_files)], ['My::Test']); -is_deeply([$used1->_packages_in($used1->_pm_files_in_test)], ['My::Test2']); -$used1->_get_packages; -is_deeply($used1->{exclude_in_testdir}, ['Test::Module::Used', 'My::Test', 'My::Test2']); -is_deeply($used1->{exclude_in_libdir}, ['My::Test']); - - diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/010_test_myself2.t /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/010_test_myself2.t --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/010_test_myself2.t 2009-12-02 16:34:04.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/t/010_test_myself2.t 1970-01-01 09:00:00.000000000 +0900 @@ -1,8 +0,0 @@ -#!/usr/bin/perl -w -use strict; -use warnings; - -use Test::Module::Used; - -my $used = Test::Module::Used->new(); -$used->ok; diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/META.yml /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/META.yml --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/META.yml 2009-11-25 17:15:26.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/META.yml 1970-01-01 09:00:00.000000000 +0900 @@ -1,28 +0,0 @@ ---- -abstract: 'Test dependency between module and META.yml' -author: - - 'Takuya Tsuchida tsucchi@cpan.org' -build_requires: - ExtUtils::MakeMaker: 6.42 - Test::More: 0.88 -configure_requires: - ExtUtils::MakeMaker: 6.42 -distribution_type: module -generated_by: 'Module::Install version 0.91' -license: perl -meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 -name: Test-Module-Used -no_index: - directory: - - inc - - t - - xt -requires: - Module::Used: 0 - PPI::Document: 0 - perl: 5.8.0 -resources: - license: http://dev.perl.org/licenses/ -version: 0.0.1 diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/META.yml2 /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/META.yml2 --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/META.yml2 2009-11-25 17:15:26.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/META.yml2 1970-01-01 09:00:00.000000000 +0900 @@ -1,29 +0,0 @@ ---- -abstract: 'Test dependency between module and META.yml' -author: - - 'Takuya Tsuchida tsucchi@cpan.org' -build_requires: - ExtUtils::MakeMaker: 6.42 - Test::More: 0.88 - Test::Class: 0 -configure_requires: - ExtUtils::MakeMaker: 6.42 -distribution_type: module -generated_by: 'Module::Install version 0.91' -license: perl -meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 -name: Test-Module-Used -no_index: - directory: - - inc - - t - - xt -requires: - Module::Used: 0 - Test::Module::Used: 0 - perl: 5.8.0 -resources: - license: http://dev.perl.org/licenses/ -version: 0.0.1 diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/META.yml3 /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/META.yml3 --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/META.yml3 2009-11-26 14:11:42.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/META.yml3 1970-01-01 09:00:00.000000000 +0900 @@ -1,26 +0,0 @@ ---- -abstract: 'write description here' -author: - - 'Takuya Tsuchida Etakuya.tsuchida@gmail.com' -build_requires: - ExtUtils::MakeMaker: 6.42 - Test::More: 0.88 -configure_requires: - ExtUtils::MakeMaker: 6.42 -distribution_type: module -generated_by: 'Module::Install version 0.91' -license: perl -meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 -name: My-Test -no_index: - directory: - - inc - - t - - xt -requires: - perl: 5.8.0 -resources: - license: http://dev.perl.org/licenses/ -version: 0.0.1 diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/lib/SampleModule.pm /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/lib/SampleModule.pm --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/lib/SampleModule.pm 2009-11-25 17:15:26.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/lib/SampleModule.pm 1970-01-01 09:00:00.000000000 +0900 @@ -1,10 +0,0 @@ -package SampleModule; -use Net::FTP; #core -use Module::Used;#not core -use Test::Module::Used;#not core - -use 5.00803;# perl version - -sub do_nothing {} - -1; diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/lib2/My/Test.pm /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/lib2/My/Test.pm --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/lib2/My/Test.pm 2009-12-01 14:54:05.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/lib2/My/Test.pm 1970-01-01 09:00:00.000000000 +0900 @@ -1,42 +0,0 @@ -package My::Test; -use strict; -use warnings; - -our $VERSION = "0.0.1"; -#use 5.008; - -=head1 NAME - -My::Test - write description here - -=head1 SYNOPSIS - -write synopsis here - -=head1 DESCRIPTION - -write description here -=cut - - -1; -__END__ - -=head1 AUTHOR - -Takuya Tsuchida Etakuya.tsuchida@gmail.com - -=head1 SEE ALSO - -write here if related module exists - -=head1 REPOSITORY - -write source code repository - -=head1 LICENSE - -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. - -=cut diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/t/001_test.t /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/t/001_test.t --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/t/001_test.t 2009-11-25 17:15:26.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/t/001_test.t 1970-01-01 09:00:00.000000000 +0900 @@ -1,6 +0,0 @@ -#!/usr/bin/perl -w -use Test::More; -use Test::Class; -use SampleModule; - -ok(1); diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/t2/001_use_ok.t /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/t2/001_use_ok.t --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/t2/001_use_ok.t 2009-11-26 14:11:29.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/t2/001_use_ok.t 1970-01-01 09:00:00.000000000 +0900 @@ -1,7 +0,0 @@ -#!/usr/bin/perl -use strict; -use warnings; -use Test::More; - -BEGIN { use_ok('My::Test') }; -done_testing(); diff -ruN --exclude=CVS /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/t2/lib/My/Test2.pm /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/t2/lib/My/Test2.pm --- /usr/ports/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/t2/lib/My/Test2.pm 2009-12-09 18:24:38.000000000 +0900 +++ /usr/home/tsucchi/ports/work/devel/p5-Test-Module-Used/work/Test-Module-Used-0.1.8/testdata/t2/lib/My/Test2.pm 1970-01-01 09:00:00.000000000 +0900 @@ -1,2 +0,0 @@ -package My::Test2; -1;