Alien-Selenium
view release on metacpan or search on metacpan
#!/usr/bin/perl -w
# This script automatically builds a "Build" file in the current
# directory (using a custom-made subclass to Module::Build), which in
# turn builds the Alien::Selenium package.
use strict;
use FindBin; use lib "$FindBin::Bin/inc";
use My::Module::Build;
require 5.006; # "our"
my $class = My::Module::Build->subclass( code => join('', <DATA>) );
my $build = $class->new
( module_name => 'Alien::Selenium',
license => 'perl',
script_files => [ qw(bin/selenium_install) ],
add_to_cleanup => [ qw(t/sel) ],
requires => {
'File::Copy' => 0,
},
build_requires => {
'Test::Builder' => 0,
'Test::More' => 0,
'Archive::Zip' => 1.00,
},
create_makefile_pl => 'passthrough',
);
$build->create_build_script;
warn sprintf("Will build Alien::Selenium with selenium version %s\n",
$build->option_value("selenium_version"));
__END__
=head1 DESCRIPTION
This is a custom-made subclass to My::Module::Build that knows how to
build Alien::Selenium. Its package name is a nonce chosen by
L<Module::Build>.
=cut
use strict;
use base qw(My::Module::Build);
=head1 COMMAND-LINE OPTIONS
=head2 --selenium-version <version>
The Selenium version that one wishes to package. By default, will use
whatever is the current value of the variable $SELENIUM_VERSION in
L<Alien::Selenium>'s source code.
=cut
sub selenium_version : Config_Option(type="string") {
# Warning, single quotes don't work in the Win32 shell, see RT #28048
my $version = `$^X -Ilib -MAlien::Selenium -e "print Alien::Selenium->version"`;
die "Problem invoking Alien::Selenium in a sub-Perl" if $?;
chomp($version);
return (default => $version);
}
=head1 INTERNAL METHODS
=cut
( run in 0.937 second using v1.01-cache-2.11-cpan-140bd7fdf52 )