Alt-Acme-Math-XS-ModuleBuild
view release on metacpan or search on metacpan
inc/Inline.pm view on Meta::CPAN
return unless @_;
&create_config_file(), return 1 if $_[0] eq '_CONFIG_';
goto &maker_utils if $_[0] =~ /^(install|makedist|makeppd)$/i;
my $control = shift;
if (uc $control eq uc 'with') {
return handle_with($pkg, @_);
}
elsif (uc $control eq uc 'Config') {
return handle_global_config($pkg, @_);
}
elsif (exists $shortcuts{uc($control)}) {
handle_shortcuts($pkg, $control, @_);
$version_requested = $CONFIG{$pkg}{template}{PRINT_VERSION};
return;
}
elsif ($control =~ /^\S+$/ and $control !~ /\n/) {
my $language_id = $control;
my $option = shift || '';
my @config = @_;
inc/Inline.pm view on Meta::CPAN
my $o = shift;
return if $o->{CONFIG}{_INSTALL_};
my ($pkg, $module) = @{$o->{API}}{qw(pkg module)};
croak M42_usage_loader() unless $o->{INLINE}{ILSM_type} eq 'compiled';
require DynaLoader;
@Inline::ISA = qw(DynaLoader);
my $global = $o->{CONFIG}{GLOBAL_LOAD} ? '0x01' : '0x00';
my $version = $o->{API}{version} || '0.00';
eval <<END;
package $pkg;
push \@$ {pkg}::ISA, qw($module)
unless \$module eq "$pkg";
local \$$ {module}::VERSION = '$version';
package $module;
push \@$ {module}::ISA, qw(Exporter DynaLoader);
sub dl_load_flags { $global }
${module}::->bootstrap;
END
croak M43_error_bootstrap($module, $@) if $@;
}
#==============================================================================
# Create file that satisfies the Makefile dependency for this object
#==============================================================================
sub satisfy_makefile_dep {
inc/Inline.pm view on Meta::CPAN
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)
unless defined $default_config->{$key};
$CONFIG{$pkg}{template}{$key} = $value;
inc/Inline/denter.pm view on Meta::CPAN
sub undent {
local $/ = "\n";
my ($o, $text) = @_;
my ($comma) = $o->{comma};
my $package = caller;
$package = caller(1) if $package eq 'Inline::denter';
%{$o->{xref}} = ();
@{$o->{objects}} = ();
@{$o->{context}} = ();
my $glob = '';
chomp $text;
@{$o->{lines}} = split $/, $text;
$o->{level} = 0;
$o->{line} ||= 1;
$o->_setup_line;
while (not $o->{done}) {
if ($o->{level} == 0 and
$o->{content} =~ /^(\w+)\s*$comma\s*(.*)$/) {
$o->{content} = $2;
no strict 'refs';
( run in 0.520 second using v1.01-cache-2.11-cpan-49f99fa48dc )