Acme-MITHALDU-XSGrabBag
view release on metacpan or search on metacpan
inc/Inline.pm view on Meta::CPAN
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}";
inc/Inline.pm view on Meta::CPAN
($untaint ? 1 : 0) :
$o->{CONFIG}{SAFEMODE}
);
if (UNTAINT and
SAFEMODE and
not $o->{CONFIG}{DIRECTORY}) {
croak M49_usage_unsafe(1) if ($< == 0 or $> == 0);
warn M49_usage_unsafe(0) if $^W;
}
if ($o->{CONFIG}{AUTONAME} == -1) {
$o->{CONFIG}{AUTONAME} = length($o->{CONFIG}{NAME}) ? 0 : 1;
}
$o->{API}{cleanup} =
($o->{CONFIG}{CLEAN_AFTER_BUILD} and not $o->{CONFIG}{REPORTBUG});
}
#==============================================================================
# Check if Inline extension is preinstalled
#==============================================================================
sub check_installed {
my $o = shift;
inc/Inline/denter.pm view on Meta::CPAN
$class = $2 || '';
if ($1 eq '%') {
%$obj = $o->_undent_hash;
}
elsif ($1 eq '@') {
@$obj = $o->_undent_array;
}
else {
$$obj = $o->_undent_scalar;
}
bless $obj, $class if length $class;
}
elsif ($o->{content} =~ /^\?\s*$/) {
$obj = $o->_undent_undef;
}
else {
$obj = $o->_undent_value;
}
while (@refs) {
my $ref = pop @refs;
my $copy = $obj;
inc/Inline/denter.pm view on Meta::CPAN
sub _setup_line {
my $o = shift;
$o->{done}++, $o->{level} = -1, return unless @{$o->{lines}};
my ($width, $tabwidth) = @{$o}{qw(width tabwidth)};
while (1) {
local $_ = $o->{lines}[0];
# expand tabs in leading whitespace;
$o->next_line, next if /^(\s*$|\#)/; # skip comments and blank lines
while (s{^( *)(\t+)}
{' ' x (length($1) + length($2) * $tabwidth -
length($1) % $tabwidth)}e){}
croak $o->M01_invalid_indent_width unless /^(( {$width})*)(\S.*)$/;
$o->{level} = length($1) / $width;
$o->{content} = $3;
last;
}
}
sub indent {
my $o = shift;
my $package = caller;
$package = caller(1) if $package eq 'Inline::denter';
my $stream = '';
( run in 1.002 second using v1.01-cache-2.11-cpan-65fba6d93b7 )