Alien-ROOT
view release on metacpan or search on metacpan
inc/inc_Archive-Extract/Archive/Extract.pm view on Meta::CPAN
}
### no buffers available?
if( !IPC::Cmd->can_capture_buffer and !$buffer ) {
$self->_error( $self->_no_buffer_files( $archive ) );
} else {
### if we're on solaris we /might/ be using /bin/tar, which has
### a weird output format... we might also be using
### /usr/local/bin/tar, which is gnu tar, which is perfectly
### fine... so we have to do some guessing here =/
my @files = map { chomp;
!ON_SOLARIS ? $_
: (m|^ x \s+ # 'xtract' -- sigh
(.+?), # the actual file name
\s+ [\d,.]+ \s bytes,
\s+ [\d,.]+ \s tape \s blocks
|x ? $1 : $_);
### only STDOUT, see above. Sometimes, extra whitespace
### is present, so make sure we only pick lines with
inc/inc_Module-Build/Module/Build/Base.pm view on Meta::CPAN
}
# record for later use in resume;
$self->{properties}{_added_to_INC} = [ $self->_added_to_INC ];
$self->set_bundle_inc;
$self->dist_name;
$self->dist_version;
$self->release_status;
$self->_guess_module_name unless $self->module_name;
$self->_find_nested_builds;
return $self;
}
sub resume {
my $package = shift;
my $self = $package->_construct(@_);
$self->read_config;
inc/inc_Module-Build/Module/Build/Base.pm view on Meta::CPAN
EOF
close $fh;
unshift @INC, File::Spec->catdir(File::Spec->rel2abs($build_dir), 'lib');
eval "use $opts{class}";
die $@ if $@;
return $opts{class};
}
sub _guess_module_name {
my $self = shift;
my $p = $self->{properties};
return if $p->{module_name};
if ( $p->{dist_version_from} && -e $p->{dist_version_from} ) {
my $mi = Module::Build::ModuleInfo->new_from_file($self->dist_version_from);
$p->{module_name} = $mi->name;
}
else {
my $mod_path = my $mod_name = $p->{dist_name};
$mod_name =~ s{-}{::}g;
inc/inc_Module-Build/Module/Build/WithXSpp.pm view on Meta::CPAN
# - configurable C++ source folder(s) (works, needs docs)
# => to be documented another time. This is really not a feature that
# should be commonly used.
sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
my %args = @_;
# This gives us the correct settings for the C++ compile (hopefully)
my $guess = ExtUtils::CppGuess->new();
if (defined $args{extra_compiler_flags}) {
if (ref($args{extra_compiler_flags})) {
$guess->add_extra_compiler_flags($_) for @{$args{extra_compiler_flags}};
}
else {
$guess->add_extra_compiler_flags($args{extra_compiler_flags})
}
delete $args{extra_compiler_flags};
}
if (defined $args{extra_linker_flags}) {
if (ref($args{extra_linker_flags})) {
$guess->add_extra_linker_flags($_) for @{$args{extra_linker_flags}};
}
else {
$guess->add_extra_linker_flags($args{extra_linker_flags})
}
delete $args{extra_linker_flags};
}
# add the typemap modules to the build dependencies
my $build_requires = $args{build_requires}||{};
my $extra_typemap_modules = $args{extra_typemap_modules}||{};
# FIXME: This prevents any potential subclasses from fudging with the extra typemaps?
foreach my $module (keys %$extra_typemap_modules) {
if (not defined $build_requires->{$module}
or defined($extra_typemap_modules->{$module})
&& $build_requires->{$module} < $extra_typemap_modules->{$module})
{
$build_requires->{$module} = $extra_typemap_modules->{$module};
}
}
$args{build_requires} = $build_requires;
# Construct object using C++ options guess
my $self = $class->SUPER::new(
%args,
$guess->module_build_options # FIXME find a way to let the user override this
);
push @{$self->extra_compiler_flags},
map "-I$_",
(@{$self->cpp_source_dirs||[]}, $self->build_dir);
$self->_init(\%args);
return $self;
}
inc/inc_Module-Build/Module/Build/WithXSpp.pm view on Meta::CPAN
push @objects, $obj;
$self->add_to_cleanup($obj);
}
$self->{properties}{objects} ||= [];
push @{$self->{properties}{objects}}, @objects;
return $self->SUPER::ACTION_code(@_);
}
# I guess I should use a module here.
sub _naive_shell_escape {
my $s = shift;
$s =~ s/\\/\\\\/g;
$s =~ s/"/\\"/g;
$s
}
sub ACTION_generate_main_xs {
my $self = shift;
( run in 0.693 second using v1.01-cache-2.11-cpan-702932259ff )