Alien-Selenium

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN

203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
print "Installing Selenium...\n";
 
my $srcdir = $self->selenium_directory;
{
    my $selenium_installdir =
        catdir(qw(blib lib Alien Selenium javascript));
    rmtree($selenium_installdir); mkpath($selenium_installdir);
 
    my @seleniumfiles = grep { -f $_ }
        ( glob(catfile($srcdir, "selenium", "*")),   # Before 0.7.0
          glob(catfile($srcdir, "core",     "*")) ); # After
 
    foreach my $file ( @seleniumfiles ) {
        my $dest = catfile( $selenium_installdir, basename( $file ) );
        $self->copy_if_modified( from    => $file,
                                 to      => $dest,
                                 verbose => 1,
                               );
    }
}

inc/IPC/Cmd.pm  view on Meta::CPAN

308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
reference.
This is a required argument.
 
=item verbose
 
This controls whether all output of a command should also be printed
to STDOUT/STDERR or should only be trapped in buffers (NOTE: buffers
require C<IPC::Run> to be installed or your system able to work with
C<IPC::Open3>).
 
It will default to the global setting of C<$IPC::Cmd::VERBOSE>,
which by default is 0.
 
=back
 
C<run> will return a simple C<true> or C<false> when called in scalar
context.
In list context, you will be returned a list of the following items:
 
=over 4

inc/IPC/Cmd.pm  view on Meta::CPAN

392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
Otherwise we will try and temporarily redirect STDERR and STDOUT, do a
system() call with your command and then re-open STDERR and STDOUT.
This is the method of last resort and will still allow you to execute
your commands cleanly. However, no buffers will be available.
 
=back
 
=head1 Global Variables
 
The behaviour of IPC::Cmd can be altered by changing the following
global variables:
 
=head2 $IPC::Cmd::VERBOSE
 
This controls whether IPC::Cmd will print any output from the
commands to the screen or not. The default is 0;
 
=head2 $IPC::Cmd::USE_IPC_RUN
 
This variable controls whether IPC::Cmd will try to use L<IPC::Run>
when available and suitable. Defaults to true.

inc/Module/Load/Conditional.pm  view on Meta::CPAN

267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
            `$cmd`;
}
 
1;
 
__END__
 
=head1 Global Variables
 
The behaviour of Module::Load::Conditional can be altered by changing the
following global variables:
 
=head2 $Module::Load::Conditional::VERBOSE
 
This controls whether Module::Load::Conditional will issue warnings and
explenations as to why certain things may have failed. If you set it
to 0, Module::Load::Conditional will not output any warnings.
The default is 0;
 
=head2 $Module::Load::Conditional::CACHE

inc/My/Module/Build.pm  view on Meta::CPAN

556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
        my ($volume, $dir, $base) = splitpath($filename);
        catfile(qw(blib stamp Inline-C),
                 join("_", splitdir($dir), $base));
    };
    return if $self->up_to_date
                ([$filename,
                  map { catfile("lib", $self->package2filename($_)) }
                  @preload_modules], [$stampfile]);
 
    # Remove any leftovers from a (failed) previous run.
    do { unlink($_) or die "Cannot unlink($_): $!" } for glob("*.inl");
 
    # And now some ugly kludge to make everything hold together.
    # Inline::C wants to use MakeMaker; we don't.  So let's call it in
    # a sub-Perl.
    my $version = $self->dist_version;
    my $module_name = $self->module_name;
 
    my $script = <<"SET_VERSION";
BEGIN { \$${module_name}::VERSION = '$version' ; }
SET_VERSION

inc/My/Module/Build.pm  view on Meta::CPAN

582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
$script =~ s/\n/ /g;
 
my @cmdline = ($^X, "-I" => catdir($self->topdir, "lib"),
               -e => $script, $version, catdir(qw(blib arch)));
warn(join(" ", @cmdline, "\n"));
local %ENV = $self->customize_env(%ENV);
system(@cmdline);
die "Command exited with status " . ($? >> 8) if $?;
 
# Remove the leftovers again.
do { unlink($_) or die "Cannot unlink($_): $!" } for glob("*.inl");
rmdir("arch");
 
# Update timestamp
if (! -d (my $stampdir = dirname($stampfile))) {
    mkpath($stampdir, 0, 0777)
        or die "cannot create directory $stampdir: $!";
}
local *STAMP;
open(STAMP, ">>", $stampfile)
    or die "cannot create or update timestamp file $stampfile: $!";

inc/Pod/Snippets.pm  view on Meta::CPAN

158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
the contents of the block.
 
=back
 
=head1 CONSTRUCTORS
 
=head2 load ($source, -opt1 => $val1, ...)
 
Parses the POD from $source and returns an object of class
B<Pod::Snippets> that holds the snippets found therein.  $source may
be the name of a file, a file descriptor (glob reference) or any
object that has a I<getline> method.
 
Available named options are:
 
=over
 
=item B<< -filename => $filename >>
 
The value to set for L</filename>, that is, the name of the file to
use for C<#line> lines in L</as_code>.  The default behavior is to use

lib/Alien/Selenium.pm  view on Meta::CPAN

67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
=cut
 
sub install {
    my( $class, $dest_dir ) = @_;
 
    File::Path::mkpath $dest_dir;
 
    my $path = $class->path();
    foreach my $f ( grep { -f $_ }
                         glob "$path/*" ) {
        File::Copy::copy( $f, $dest_dir )
            or die "Can't copy $f to $dest_dir: $!";
    }
}
 
=item I<path_readystate_xpi ()>
 
Returns the path to the C<readyState.xpi> Mozilla/Firefox extension
that is part of Selenium starting at version 0.8.0.  Returns undef for
versions of Selenium that do not have such a file.

t/maintainer/pod-source.t  view on Meta::CPAN

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
 
plan(skip_all => "Test::Pod 1.14 required for testing POD"), exit unless
    eval "use Test::Pod 1.14; 1";
plan(skip_all => "Pod::Checker required for testing POD"), exit unless
    eval "use Pod::Checker; 1";
plan(skip_all => "Pod::Text required for testing POD"), exit unless
    eval "use Pod::Text; 1";
 
my @files = Test::Pod::all_pod_files(glob("*.pm"), "lib");
plan(skip_all => "no POD (yet?)"), exit if ! @files;
 
plan( tests => 3 * scalar (@files) );
 
my $out = catfile(qw(t pod-out.tmp));
 
sub podcheck_ok {
    my ($file, @testcomment) = @_;
    my $checker = new My::Pod::Checker;
    $checker->parse_from_file($file, \*STDERR);



( run in 0.276 second using v1.01-cache-2.11-cpan-26ccb49234f )