Acme-MITHALDU-XSGrabBag
view release on metacpan or search on metacpan
inc/Inline.pm view on Meta::CPAN
}
return (@others);
}
#==============================================================================
# Set option defaults based on current option settings.
#==============================================================================
sub fold_options {
my $o = shift;
# The following small section of code seems, to me, to be unnecessary - which is the
# reason that I've commented it out. I've left it here (including its associated comments)
# in case it later becomes evident that there *is* good reason to include it. --sisyphus
#
## This bit tries to enable UNTAINT automatically if required when running the test suite.
# my $env_ha = $ENV{HARNESS_ACTIVE} || 0 ;
# my ($harness_active) = $env_ha =~ /(.*)/ ;
# if (($harness_active)&&(! $o->{CONFIG}{UNTAINT})){
# eval {
# require Scalar::Util;
# $o->{CONFIG}{UNTAINT} =
inc/Inline.pm view on Meta::CPAN
open INLINE, "> $inline"
or croak M24_open_for_output_failed($inline);
print INLINE "*** AUTOGENERATED by Inline.pm ***\n\n";
print INLINE "This file satisfies the make dependency for ";
print INLINE "$o->{API}{module}\n";
close INLINE;
return;
}
#==============================================================================
# Process the config options that apply to all Inline sections
#==============================================================================
sub handle_global_config {
my $pkg = shift;
while (@_) {
my ($key, $value) = (uc shift, shift);
croak M02_usage() if $key =~ /[\s\n]/;
if ($key =~ /^(ENABLE|DISABLE)$/) {
($key, $value) = (uc $value, $key eq 'ENABLE' ? 1 : 0);
}
croak M47_invalid_config_option($key)
inc/Inline.pm view on Meta::CPAN
return <<END;
Inline assumes '$file' is a filename,
and that file does not exist.
END
}
sub M08_no_DATA_source_code {
my ($lang) = @_;
return <<END;
No source code in DATA section for Inline '$lang' section.
END
}
sub M09_marker_mismatch {
my ($marker, $lang) = @_;
return <<END;
Marker '$marker' does not match Inline '$lang' section.
END
}
sub M10_usage_WITH_USING {
return <<END;
Config option WITH or USING must be a module name or an array ref
of module names.
END
inc/Inline.pm view on Meta::CPAN
The NAME must match the current package name:
$pkg
END
}
sub M41_usage_install_version_mismatch {
my ($mod_name, $mod_ver, $ext_name, $ext_ver) = @_;
<<END;
The version '$mod_ver' for module '$mod_name' doe not match
the version '$ext_ver' for Inline section '$ext_name'.
END
}
sub M42_usage_loader {
return <<END;
ERROR. The loader that was invoked is for compiled languages only.
END
}
inc/Inline.pm view on Meta::CPAN
END
($terminate ? <<END : "");
Since you are running as a privileged user, Inline.pm is terminating.
END
}
sub M51_unused_DATA {
return <<END;
One or more DATA sections were not processed by Inline.
END
}
sub M52_invalid_filter {
my ($filter) = @_;
return <<END;
Invalid filter '$filter' is not a reference.
END
inc/Inline/C.pm view on Meta::CPAN
$o->call('write_Makefile_PL', 'Build Glue 3');
$o->call('compile', 'Build Compile');
if (IS_WIN32) {
$lockfh->release or die "releasemutex $file: $^E";
}
else {
flock($lockfh, LOCK_UN) if $^O !~ /^VMS|riscos|VOS$/;
}
if ($o->{CONFIG}{BUILD_TIMERS}) {
$total_build_time = Time::HiRes::time() - $total_build_time;
printf STDERR "Total Build Time: %5.4f secs\n", $total_build_time;
}
}
sub call {
my ($o, $method, $header, $indent) = (@_, 0);
my $time;
my $i = ' ' x $indent;
print STDERR "${i}Starting $header Stage\n" if $o->{CONFIG}{BUILD_NOISY};
$time = Time::HiRes::time()
if $o->{CONFIG}{BUILD_TIMERS};
$o->$method();
$time = Time::HiRes::time() - $time
if $o->{CONFIG}{BUILD_TIMERS};
print STDERR "${i}Finished $header Stage\n" if $o->{CONFIG}{BUILD_NOISY};
printf STDERR "${i}Time for $header Stage: %5.4f secs\n", $time
if $o->{CONFIG}{BUILD_TIMERS};
print STDERR "\n" if $o->{CONFIG}{BUILD_NOISY};
}
#==============================================================================
# Apply any
#==============================================================================
sub preprocess {
my $o = shift;
return if $o->{ILSM}{parser};
inc/Inline/Module.pm view on Meta::CPAN
}
#------------------------------------------------------------------------------
# The postamble method:
#------------------------------------------------------------------------------
sub postamble {
my ($makemaker, %args) = @_;
DEBUG_ON && DEBUG "Inline::Module::postamble(${\join', ',@_})";
my $meta = $args{inline}
or croak "'postamble' section requires 'inline' key in Makefile.PL";
croak "postamble 'inline' section requires 'module' key in Makefile.PL"
unless $meta->{module};
my $class = __PACKAGE__;
$class->default_meta($meta);
my $code_modules = $meta->{module};
my $stub_modules = $meta->{stub};
my $included_modules = $class->included_modules($meta);
if ($meta->{makestub} and not -e 'inc' and not -e 'INLINE.h') {
$class->make_stub_modules(@{$meta->{stub}});
}
my $section = <<"...";
clean ::
\t- \$(RM_RF) $inline_build_path
distdir : distdir_inline
distdir_inline : create_distdir
\t\$(NOECHO) \$(ABSPERLRUN) -MInline::Module=distdir -e 1 -- \$(DISTVNAME) @$stub_modules -- @$included_modules
pure_all ::
...
for my $module (@$code_modules) {
$section .=
"\t\$(NOECHO) \$(ABSPERLRUN) -Iinc -Ilib -M$module -e 1 --\n";
}
$section .=
"\t\$(NOECHO) \$(ABSPERLRUN) -Iinc -MInline::Module=fixblib -e 1 --\n";
return $section;
}
#------------------------------------------------------------------------------
# The handle methods.
#------------------------------------------------------------------------------
sub handle_stub {
my ($class, $stub_module, $api_version) = @_;
DEBUG_ON && DEBUG "$class->handle_stub($stub_module, $api_version)";
$class->check_api_version($stub_module, $api_version);
no strict 'refs';
( run in 2.255 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )