Alt-Acme-Math-XS-ModuleInstall
view release on metacpan or search on metacpan
inc/Inline.pm view on Meta::CPAN
$o->obj_untaint if UNTAINT;
print_version() if $version_requested;
$o->reportbug() if $o->{CONFIG}{REPORTBUG};
if (not $o->{INLINE}{object_ready}
or $o->{CONFIG}{PRINT_INFO}
) {
eval "require $o->{INLINE}{ILSM_module}";
croak M05_error_eval('glue', $@) if $@;
$o->push_overrides;
bless $o, $o->{INLINE}{ILSM_module};
$o->validate(@config);
}
else {
$o->{CONFIG} = {(%{$o->{CONFIG}}, @config)};
}
$o->print_info if $o->{CONFIG}{PRINT_INFO};
unless ($o->{INLINE}{object_ready} or
not length $o->{INLINE}{ILSM_suffix}) {
$o->build();
$o->write_inl_file() unless $o->{CONFIG}{_INSTALL_};
}
if ($o->{INLINE}{ILSM_suffix} ne 'so' and
$o->{INLINE}{ILSM_suffix} ne 'dll' and
$o->{INLINE}{ILSM_suffix} ne 'bundle' and
$o->{INLINE}{ILSM_suffix} ne 'sl' and
ref($o) eq 'Inline'
) {
eval "require $o->{INLINE}{ILSM_module}";
croak M05_error_eval('glue', $@) if $@;
$o->push_overrides;
bless $o, $o->{INLINE}{ILSM_module};
$o->validate(@config);
}
$o->load;
$o->pop_overrides;
}
#==============================================================================
# Set up the USING overrides
#==============================================================================
sub push_overrides {
my ($o) = @_;
inc/Inline.pm view on Meta::CPAN
To allow Inline to compile the module in a temporary cache, simply remove the
Inline config option 'VERSION=' from the $pkg module.
END
}
sub M31_inline_open_failed {
my ($file) = @_;
return <<END;
Can't open Inline validate file:
$file
$!
END
#'
}
sub M32_error_md5_validation {
inc/Inline/C.pm view on Meta::CPAN
# XXX Breaking this on purpose; let's see who screams
# aliases => ['c'],
type => 'compiled',
suffix => $Config{dlext},
};
}
#==============================================================================
# Validate the C config options
#==============================================================================
sub usage_validate {
my $key = shift;
return <<END;
The value of config option '$key' must be a string or an array ref
END
}
sub validate {
my $o = shift;
print STDERR "validate Stage\n" if $o->{CONFIG}{BUILD_NOISY};
$o->{ILSM} ||= {};
$o->{ILSM}{XS} ||= {};
$o->{ILSM}{MAKEFILE} ||= {};
if (not $o->UNTAINT) {
require FindBin;
$o->{ILSM}{MAKEFILE}{INC} = "-I\"$FindBin::Bin\""
if not defined $o->{ILSM}{MAKEFILE}{INC};
}
$o->{ILSM}{AUTOWRAP} = 0 if not defined $o->{ILSM}{AUTOWRAP};
$o->{ILSM}{XSMODE} = 0 if not defined $o->{ILSM}{XSMODE};
inc/Inline/C.pm view on Meta::CPAN
else {
$ref->{$key} = $default;
}
}
}
sub add_string {
my $o = shift;
my ($ref, $key, $value, $default) = @_;
$value = [$value] unless ref $value;
croak usage_validate($key) unless ref($value) eq 'ARRAY';
for (@$value) {
if (defined $_) {
$ref->{$key} .= ' ' . $_;
}
else {
$ref->{$key} = $default;
}
}
}
sub add_text {
my $o = shift;
my ($ref, $key, $value, $default) = @_;
$value = [$value] unless ref $value;
croak usage_validate($key) unless ref($value) eq 'ARRAY';
for (@$value) {
if (defined $_) {
chomp;
$ref->{$key} .= $_ . "\n";
}
else {
$ref->{$key} = $default;
}
}
}
( run in 0.481 second using v1.01-cache-2.11-cpan-a5abf4f5562 )