Alien-Selenium
view release on metacpan or search on metacpan
my $self = shift;
$self->SUPER::ACTION_code;
$self->fetch_selenium;
$self->extract_selenium;
$self->install_selenium;
}
=head2 process_pm_files
Overloaded from parent class so as to reserve a special treatment to
L<Alien::Selenium>; namely, the value of $SELENIUM_VERSION is changed
in place to reflect that of the L<--selenium-version> command-line
switch.
=cut
sub process_pm_files {
my ($self) = @_;
$self->SUPER::process_pm_files(@_);
inc/File/Spec/Unix.pm view on Meta::CPAN
}
sub tmpdir {
return $tmpdir if defined $tmpdir;
my $self = shift;
$tmpdir = $self->_tmpdir( $ENV{TMPDIR}, "/tmp" );
}
=item updir
Returns a string representation of the parent directory. ".." on UNIX.
=cut
sub updir () { '..' }
=item no_upwards
Given a list of file names, strip out those that refer to a parent
directory. (Does not strip symlinks, only '.', '..', and equivalents.)
=cut
sub no_upwards {
my $self = shift;
return grep(!/^\.{1,2}\Z(?!\n)/s, @_);
}
=item case_tolerant
inc/File/Spec/Unix.pm view on Meta::CPAN
while (@pathchunks && @basechunks && $pathchunks[0] eq $basechunks[0]) {
shift @pathchunks ;
shift @basechunks ;
}
$path = CORE::join( '/', @pathchunks );
$base = CORE::join( '/', @basechunks );
# $base now contains the directories the resulting relative path
# must ascend out of before it can descend to $path_directory. So,
# replace all names with $parentDir
$base =~ s|[^/]+|..|g ;
# Glue the two together, using a separator if necessary, and preventing an
# empty result.
if ( $path ne '' && $base ne '' ) {
$path = "$base/$path" ;
} else {
$path = "$base$path" ;
}
inc/My/Module/Build.pm view on Meta::CPAN
=end internals
=head2 Constructors and Class Methods
These are intended to be called directly from Build.PL
=over
=item I<new(%named_options)>
Overloaded from parent class in order to call
L</check_maintainer_dependencies> if L</maintainer_mode_enabled> is
true. Also sets the C<recursive_test_files> property to true by
default (see L<Module::Build/test_files>), since I like to store
maintainer-only tests in C<t/maintainer> (as documented in
L</find_test_files>).
In addition to the %named_options documented in L<Module::Build/new>,
I<My::Module::Build> provides support for the following switches:
=over
inc/My/Module/Build.pm view on Meta::CPAN
my $self = shift;
eval { require YAML } or die ($@ . <<"MESSAGE");
YAML is required for distmeta to produce accurate results. Please
install it and re-run this command.
MESSAGE
# Steals a reference to the YAML object that will be constructed
# by the parent class (duhh)
local our $orig_yaml_node_new = \&YAML::Node::new;
local our $node;
no warnings "redefine";
local *YAML::Node::new = sub {
$node = $orig_yaml_node_new->(@_);
};
my $retval = $self->SUPER::ACTION_distmeta;
die "Failed to steal the YAML node" unless defined $node;
inc/My/Module/Build.pm view on Meta::CPAN
order to provide a different filter. The filter object should obey
the API set forth in L</My::Module::Build::PmFilter Ancillary Class>,
although it need not inherit from same.
=cut
sub new_pm_filter { My::Module::Build::PmFilter->new }
=item I<find_test_files()>
Overloaded from parent class to treat all .pm files in C<lib/> and
C<t/lib/> as unit tests if they use L<My::Tests::Below>, to look for
C<.t> files in C<examples/>, and to retain C<.t> test files in
C<t/maintainer> if and only if L</maintainer_mode_enabled> is true.
=cut
sub find_test_files {
my $self = shift;
# Short-cut activated by L</ACTION_test>:
inc/My/Module/Build.pm view on Meta::CPAN
\@ISA = our \@ISAorig;
$opts{code}
KLUDGE_ME_UP
return $pack->SUPER::subclass(%opts);
}
=item I<_startperl>
Overloaded from parent to attempt a chdir() into the right place in
./Build during initialization. This is an essential enabler to the
Emacs debugger support (see L</ACTION_test>) because we simply cannot
tell where Emacs will be running us from.
=cut
sub _startperl {
my $self = shift;
my $basedir = $self->base_dir;
$basedir = Win32::GetShortPathName($basedir) if is_win32;
inc/My/Module/Build.pm view on Meta::CPAN
\$My::Module::Build::initial_cwd = \$My::Module::Build::initial_cwd =
Cwd::cwd;
chdir("$basedir") || 1;
}
MORE
}
=item I<_packages_inside($file)>
Returns a list of Perl packages to be found inside $file. Overloaded
from the parent class so as to refrain from parsing after the __END__
marker.
=cut
sub _packages_inside {
# Copied 'n modified from the parent class, doubleplusshame on me!
my ($self, $file) = @_;
my $fh = IO::File->new($file) or die "Can't read $file: $!";
my @packages;
while(my (undef, $p) = $self->_next_code_line
($fh, qr/^(?:__END__$|__DATA__$|[\s\{;]*package\s+([\w:]+))/)) {
last if ! defined $p;
push @packages, $p;
}
return @packages;
inc/Params/Check.pm view on Meta::CPAN
if( $wrong ) {
_store_error(
loc(qq[Key '%1' is of invalid type for %2 provided by %3],
$key, _who_was_it(), _who_was_it(1)),
$verbose
);
++$flag && next;
} else {
### if we got here, it's apparently an ok value for $key,
### so we'll set it in the default to return it in a bit
$defs->{$key} = $args->{$key};
}
}
}
### check if we need to store ###
for my $key ( keys %$defs ) {
if( my $scalar = $tmpl->{$key}->{store} ) {
( run in 1.288 second using v1.01-cache-2.11-cpan-4d50c553e7e )