view release on metacpan or search on metacpan
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
Makefile.PL view on Meta::CPAN
use inc::Module::Install::DSL 1.06;
all_from lib/ADAMK/Release.pm
requires_from lib/ADAMK/Release.pm
requires Getopt::Long 2.33
requires Perl::MinimumVersion 1.27
requires Test::MinimumVersion 0.101080
requires Test::Pod 1.44
test_requires Test::More 0.42
test_requires Test::Script 1.07
install_script adamk-release
install_share
inc/Module/Install.pm view on Meta::CPAN
}
sub import {
my $class = shift;
my $self = $class->new(@_);
my $who = $self->_caller;
#-------------------------------------------------------------
# all of the following checks should be included in import(),
# to allow "eval 'require Module::Install; 1' to test
# installation of Module::Install. (RT #51267)
#-------------------------------------------------------------
# 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';
inc/Module/Install/Can.pm view on Meta::CPAN
# Ensure we have the CBuilder module
$self->configure_requires( 'ExtUtils::CBuilder' => 0.27 );
# Do we have the configure_requires checker?
local $@;
eval "require ExtUtils::CBuilder;";
if ( $@ ) {
# They don't obey configure_requires, so it is
# someone old and delicate. Try to avoid hurting
# them by falling back to an older simpler test.
return $self->can_cc();
}
# Do we have a working C compiler
my $builder = ExtUtils::CBuilder->new(
quiet => 1,
);
unless ( $builder->have_compiler ) {
# No working C compiler
return 0;
inc/Module/Install/Makefile.pm view on Meta::CPAN
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 or non-interactive session, always use defaults
if ( ($ENV{AUTOMATED_TESTING} or -! -t STDIN) and ! $ENV{PERL_MM_USE_DEFAULT} ) {
local $ENV{PERL_MM_USE_DEFAULT} = 1;
goto &ExtUtils::MakeMaker::prompt;
} else {
goto &ExtUtils::MakeMaker::prompt;
}
}
# Store a cleaned up version of the MakeMaker version,
# since we need to behave differently in a variety of
inc/Module/Install/Makefile.pm view on Meta::CPAN
# _KEEP_AFTER_FLUSH => '',
clean => 'HASH',
depend => 'HASH',
dist => 'HASH',
dynamic_lib=> 'HASH',
linkext => 'HASH',
macro => 'HASH',
postamble => 'HASH',
realclean => 'HASH',
test => 'HASH',
tool_autosplit => 'HASH',
# special cases where you can use makemaker_append
CCFLAGS => 'APPENDABLE',
DEFINE => 'APPENDABLE',
INC => 'APPENDABLE',
LDDLFLAGS => 'APPENDABLE',
LDFROM => 'APPENDABLE',
);
inc/Module/Install/Makefile.pm view on Meta::CPAN
}
sub inc {
my $self = shift;
$self->makemaker_args( INC => shift );
}
sub _wanted_t {
}
sub tests_recursive {
my $self = shift;
my $dir = shift || 't';
unless ( -d $dir ) {
die "tests_recursive dir '$dir' does not exist";
}
my %tests = map { $_ => 1 } split / /, ($self->tests || '');
require File::Find;
File::Find::find(
sub { /\.t$/ and -f $_ and $tests{"$File::Find::dir/*.t"} = 1 },
$dir
);
$self->tests( join ' ', sort keys %tests );
}
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"
inc/Module/Install/Makefile.pm view on Meta::CPAN
# Make sure we have a new enough MakeMaker
require ExtUtils::MakeMaker;
if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) {
# This previous attempted to inherit the version of
# ExtUtils::MakeMaker in use by the module author, but this
# was found to be untenable as some authors build releases
# using future dev versions of EU:MM that nobody else has.
# Instead, #toolchain suggests we use 6.59 which is the most
# stable version on CPAN at time of writing and is, to quote
# ribasushi, "not terminally fucked, > and tested enough".
# TODO: We will now need to maintain this over time to push
# the version up as new versions are released.
$self->build_requires( 'ExtUtils::MakeMaker' => 6.59 );
$self->configure_requires( 'ExtUtils::MakeMaker' => 6.59 );
} 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.36 );
$self->configure_requires( 'ExtUtils::MakeMaker' => 6.36 );
}
inc/Module/Install/Makefile.pm view on Meta::CPAN
$args->{DISTNAME} = $self->name;
$args->{NAME} = $self->module_name || $self->name;
$args->{NAME} =~ s/-/::/g;
$args->{VERSION} = $self->version or die <<'EOT';
ERROR: Can't determine distribution version. Please specify it
explicitly via 'version' in Makefile.PL, or set a valid $VERSION
in a module, and provide its file path via 'version_from' (or
'all_from' if you prefer) in Makefile.PL.
EOT
if ( $self->tests ) {
my @tests = split ' ', $self->tests;
my %seen;
$args->{test} = {
TESTS => (join ' ', grep {!$seen{$_}++} @tests),
};
} elsif ( $Module::Install::ExtraTests::use_extratests ) {
# Module::Install::ExtraTests doesn't set $self->tests and does its own tests via harness.
# So, just ignore our xt tests here.
} elsif ( -d 'xt' and ($Module::Install::AUTHOR or $ENV{RELEASE_TESTING}) ) {
$args->{test} = {
TESTS => join( ' ', map { "$_/*.t" } grep { -d $_ } qw{ t xt } ),
};
}
if ( $] >= 5.005 ) {
$args->{ABSTRACT} = $self->abstract;
$args->{AUTHOR} = join ', ', @{$self->author || []};
}
if ( $self->makemaker(6.10) ) {
$args->{NO_META} = 1;
#$args->{NO_MYMETA} = 1;
inc/Module/Install/Makefile.pm view on Meta::CPAN
. $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: $!";
eval { flock MAKEFILE, LOCK_EX };
my $makefile = do { local $/; <MAKEFILE> };
$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;
inc/Module/Install/Metadata.pm view on Meta::CPAN
my @boolean_keys = qw{
sign
};
my @scalar_keys = qw{
name
module_name
abstract
version
distribution_type
tests
installdirs
};
my @tuple_keys = qw{
configure_requires
build_requires
requires
recommends
bundles
resources
inc/Module/Install/Metadata.pm view on Meta::CPAN
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;
inc/Module/Install/Metadata.pm view on Meta::CPAN
my $self = shift;
my $content = Module::Install::_readperl($_[0]);
my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+(v?[\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;
lib/ADAMK/Release.pm view on Meta::CPAN
};
use Object::Tiny 1.01 qw{
module
github
verbose
release
no_rt
no_changes
no_copyright
no_test
}, map { "bin_$_" } TOOLS;
######################################################################
# Constructor
lib/ADAMK/Release.pm view on Meta::CPAN
# Apply a default LICENSE file
unless ( -f $self->dist_license ) {
$self->copy( $self->shared_license => $self->dist_license );
}
# Add ppport.h if any XS files use it
if ( $self->find_ppport->in( $self->dist_dir ) ) {
Devel::PPPort::WriteFile( $self->dist_ppport );
}
# Copy in author tests as needed
unless ( -f $self->dist_99_author ) {
foreach my $xt ( qw{ pod.t pmv.t } ) {
next if -f catfile( $self->dist_xt, $xt );
$self->copy(
catfile( $self->shared_dir, $xt ),
catfile( $self->dist_xt, $xt ),
);
}
}
lib/ADAMK/Release.pm view on Meta::CPAN
return;
}
sub build_make {
my $self = shift;
# Create the Makefile and MANIFEST
$self->build_makefile;
$self->build_makefile_manifest;
unless ( $self->no_test ) {
# Test the distribution normally
$self->shell(
$self->bin_make,
'disttest',
'disttest failed',
);
# Test with AUTOMATED_TESTING on
SCOPE: {
local $ENV{AUTOMATED_TESTING} = 1;
$self->build_makefile;
$self->shell(
$self->bin_make,
"disttest",
'disttest failed',
);
}
# Test with RELEASE_TESTING on
SCOPE: {
local $ENV{RELEASE_TESTING} = 1;
$self->build_makefile;
$self->shell(
$self->bin_make,
"disttest",
'disttest failed',
);
}
# Test with RELEASE_TESTING and root permissions.
# This catches bad test script assumptions in modules related
# to files and permissions (File::Remove, File::Flat etc).
SCOPE: {
local $ENV{RELEASE_TESTING} = 1;
$self->sudo(
qw{ perl Makefile.PL },
'Error while creating Makefile',
);
$self->sudo(
$self->bin_make,
"disttest",
'disttest failed',
);
# Clean up leftover root files and rebuild from scratch
$self->build_realclean;
$self->build_makefile;
$self->build_makefile_manifest;
# Run the test suite one last time to make sure we
# didn't break anything.
$self->sudo(
$self->bin_make,
"disttest",
'disttest failed',
);
# Clean up the leftover root files again
$self->build_realclean;
}
}
# Create the Makefile and MANIFEST
$self->build_makefile;
$self->build_makefile_manifest;
lib/ADAMK/Release.pm view on Meta::CPAN
'Error while creating Makefile',
);
# Create the MANIFEST file
$self->shell(
"./Build",
"manifest",
'Error while creating the MANIFEST',
);
unless ( $self->no_test ) {
# Test the distribution normally
$self->shell(
qw{ ./Build disttest },
'disttest failed',
);
}
# Build the tardist
$self->shell(
qw{ ./Build dist },
'Error making distribution tarball',
);
return;
script/adamk-release view on Meta::CPAN
my $NO_RT = '';
my $NO_TEST = '';
# Set the settings and arg the arguments
Getopt::Long::GetOptions(
verbose => \$VERBOSE,
release => \$RELEASE,
nochanges => \$NO_CHANGES,
nocopyright => \$NO_COPYRIGHT,
nort => \$NO_RT,
notest => \$NO_TEST,
);
# Get the module name
unless ( @ARGV ) {
die "Missing or invalid distribution name";
}
my $module = shift @ARGV;
my $repository = $module;
$repository =~ s/::/-/g;
script/adamk-release view on Meta::CPAN
my $release = ADAMK::Release->new(
module => $module,
github => {
username => 'adamkennedy',
repository => $repository,
},
release => $RELEASE,
no_changes => $NO_CHANGES,
no_copyright => $NO_COPYRIGHT,
no_rt => $NO_RT,
no_test => $NO_TEST,
);
######################################################################
# Execution
share/LICENSE view on Meta::CPAN
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
share/LICENSE view on Meta::CPAN
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
share/pmv.t view on Meta::CPAN
BEGIN {
$| = 1;
$^W = 1;
}
my @MODULES = (
'Perl::MinimumVersion 1.27',
'Test::MinimumVersion 0.101080',
);
# Don't run tests for installs
use Test::More;
unless ( $ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING} ) {
plan( skip_all => "Author tests not required for installation" );
}
# Load the testing modules
foreach my $MODULE ( @MODULES ) {
eval "use $MODULE";
if ( $@ ) {
$ENV{RELEASE_TESTING}
? die( "Failed to load required release-testing module $MODULE" )
: plan( skip_all => "$MODULE not available for testing" );
}
}
all_minimum_version_from_metayml_ok();
share/pod.t view on Meta::CPAN
BEGIN {
$| = 1;
$^W = 1;
}
my @MODULES = (
'Pod::Simple 3.14',
'Test::Pod 1.44',
);
# Don't run tests for installs
use Test::More;
unless ( $ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING} ) {
plan( skip_all => "Author tests not required for installation" );
}
# Load the testing modules
foreach my $MODULE ( @MODULES ) {
eval "use $MODULE";
if ( $@ ) {
$ENV{RELEASE_TESTING}
? die( "Failed to load required release-testing module $MODULE" )
: plan( skip_all => "$MODULE not available for testing" );
}
}
all_pod_files_ok();
t/01_compile.t view on Meta::CPAN
#!/usr/bin/perl
use 5.10.0;
use strict;
use warnings;
use Test::More tests => 2;
use Test::Script;
use_ok('ADAMK::Release');
script_compiles('script/adamk-release');
BEGIN {
$| = 1;
$^W = 1;
}
my @MODULES = (
'Perl::MinimumVersion 1.27',
'Test::MinimumVersion 0.101080',
);
# Don't run tests for installs
use Test::More;
unless ( $ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING} ) {
plan( skip_all => "Author tests not required for installation" );
}
# Load the testing modules
foreach my $MODULE ( @MODULES ) {
eval "use $MODULE";
if ( $@ ) {
$ENV{RELEASE_TESTING}
? die( "Failed to load required release-testing module $MODULE" )
: plan( skip_all => "$MODULE not available for testing" );
}
}
all_minimum_version_from_metayml_ok();
BEGIN {
$| = 1;
$^W = 1;
}
my @MODULES = (
'Pod::Simple 3.14',
'Test::Pod 1.44',
);
# Don't run tests for installs
use Test::More;
unless ( $ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING} ) {
plan( skip_all => "Author tests not required for installation" );
}
# Load the testing modules
foreach my $MODULE ( @MODULES ) {
eval "use $MODULE";
if ( $@ ) {
$ENV{RELEASE_TESTING}
? die( "Failed to load required release-testing module $MODULE" )
: plan( skip_all => "$MODULE not available for testing" );
}
}
all_pod_files_ok();