Alien-Selenium
view release on metacpan or search on metacpan
inc/File/Fetch.pm view on Meta::CPAN
# }
#
# return $to;
# }
1;
#line 778
# Local variables:
# c-indentation-style: bsd
# c-basic-offset: 4
# indent-tabs-mode: nil
# End:
# vim: expandtab shiftwidth=4:
inc/File/Spec/Unix.pm view on Meta::CPAN
No physical check on the filesystem, but a logical cleanup of a
path. On UNIX eliminates successive slashes and successive "/.".
$cpath = File::Spec->canonpath( $path ) ;
=cut
sub canonpath {
my ($self,$path) = @_;
# Handle POSIX-style node names beginning with double slash (qnx, nto)
# Handle network path names beginning with double slash (cygwin)
# (POSIX says: "a pathname that begins with two successive slashes
# may be interpreted in an implementation-defined manner, although
# more than two leading slashes shall be treated as a single slash.")
my $node = '';
if ( $^O =~ m/^(?:qnx|nto|cygwin)$/ && $path =~ s:^(//[^/]+)(/|\z):/:s ) {
$node = $1;
}
# This used to be
# $path =~ s|/+|/|g unless($^O eq 'cygwin');
inc/Locale/Maketext/Simple.pm view on Meta::CPAN
'*' => [ Gettext => \$pattern ],
_decode => \$decode,
});
*tense = sub { \$_[1] . ((\$_[2] eq 'present') ? 'ing' : 'ed') }
unless defined &tense;
1;
" or die $@;
my $lh = eval { $pkg->get_handle } or return;
my $style = lc($args{Style});
if ($style eq 'maketext') {
$Loc{$pkg} = sub {
$lh->maketext(@_)
};
}
elsif ($style eq 'gettext') {
$Loc{$pkg} = sub {
my $str = shift;
$str =~ s/[\~\[\]]/~$&/g;
$str =~ s{(^|[^%\\])%([A-Za-z#*]\w*)\(([^\)]*)\)}
{"$1\[$2,"._unescape($3)."]"}eg;
$str =~ s/(^|[^%\\])%(\d+|\*)/$1\[_$2]/g;
return $lh->maketext($str, @_);
};
}
else {
die "Unknown Style: $style";
}
return $Loc{$pkg}, sub {
$lh = $pkg->get_handle(@_);
$lh = $pkg->get_handle(@_);
};
}
sub default_loc {
my ($self, %args) = @_;
my $style = lc($args{Style});
if ($style eq 'maketext') {
return sub {
my $str = shift;
$str =~ s/((?<!~)(?:~~)*)\[_(\d+)\]/$1%$2/g;
$str =~ s{((?<!~)(?:~~)*)\[([A-Za-z#*]\w*),([^\]]+)\]}
{"$1%$2("._escape($3).")"}eg;
$str =~ s/~([\[\]])/$1/g;
_default_gettext($str, @_);
};
}
elsif ($style eq 'gettext') {
return \&_default_gettext;
}
else {
die "Unknown Style: $style";
}
}
sub _default_gettext {
my $str = shift;
$str =~ s{
% # leading symbol
(?: # either one of
\d+ # a digit, like %1
| # or
inc/My/Module/Build.pm view on Meta::CPAN
## The remainder of the script works like with stock Module::Build
=for My::Tests::Below "synopsis" end
=head1 DESCRIPTION
DOMQ is a guy who releases CPAN packages from time to time - you are
probably frobbing into one of them right now.
This module is a subclass to L<Module::Build> by Ken Williams, and a
helper that supports DOMQ's coding style for Perl modules so as to
facilitate relasing my code to the world.
=head2 How to use My::Module::Build for a new CPAN package
This part of the documentation is probably only useful to myself,
but hey, you never know - Feel free to share and enjoy!
=over
=item 1.
inc/My/Module/Build.pm view on Meta::CPAN
and the aforementioned no_index exclusions will be set up
automatically (but B<please double-check nevertheless>).
=back
=head2 Coding Style and Practices supported by this module
No, I don't want to go into silly regulations regarding whether I
should start a new line before the opening bracket in a sub
declaration. This would be coding syntax, or coding grammar. The stuff
here is about style, and only the subset thereof that is somehow under
control of the CPAN build process.
=head3 Unit tests
A large fraction of the unit tests are written as perlmodlib-style
__END__ documents attached directly to the module to test. See
L<My::Tests::Below> for details. My::Module::Build removes the test
footer at build time so as not to waste any resources on the install
target platform.
=head3 Extended C<test> action
The C<./Build test> action allows one to specify a list of individual
test scripts to run, in a less cumbersome fashion than straight
L<Module::Build>:
inc/My/Module/Build.pm view on Meta::CPAN
=for My::Tests::Below "great justice" begin
perl Makefile.PL
make your time
=for My::Tests::Below "great justice" end
produces a helpful message in packages that have a Makefile.PL (see
L<Module::Build/create_makefile_pl> for how to do that). You won't get
signal if you use a "traditional" style Makefile.PL (but on the other
hand the rest of I<My::Module::Build> will not work either, so don't
do that).
This easter egg was a feature of an old GNU-make based build framework
that I created in a former life. So there.
=cut
sub do_create_makefile_pl {
my ($self, %args) = @_;
inc/My/Tests/Below.pm view on Meta::CPAN
use MyPackage;
# And there you go with your test suite
=head1 DESCRIPTION
DOMQ is a guy who releases CPAN packages from time to time - you are
probably frobbing into one of them right now.
This package is a helper that supports my coding style for unit tests
so as to facilitate relasing my code to the world.
=head2 How it works
The test code is written in L<perlmodlib> style, that is, at the
bottom of the Perl module to test, after an __END__ marker. This way
of organizing test code is not unlike L<Test::Inline>, by Adam Kennedy
et al, in that it keeps code, documentation and tests in the same
place, encouraging developers to modify all three at once.
I like to use L<Test::Group> for the unit perlmodlib-style unit tests,
because counting and recounting my tests drives me nuts :-). However
C<My::Tests::Below> itself is testing-framework agnostic (its own
self-test suite, for instance, uses only plain old L<Test::More>).
Invoking C<require My::Tests::Below> from anywhere (the idiomatic form
is shown in L</SYNOPSIS>) results in the block of code after the
__END__ marker being run at once. Due to the way this construct abuses
the Perl module mechanism, My::Tests::Below cannot be require()d or
use()d for any other purpose, hence the funny name.
inc/Params/Check.pm view on Meta::CPAN
sub last_error { $ErrorString }
}
1;
__END__
#line 731
# Local variables:
# c-indentation-style: bsd
# c-basic-offset: 4
# indent-tabs-mode: nil
# End:
# vim: expandtab shiftwidth=4:
inc/Pod/Snippets.pm view on Meta::CPAN
appropriate parser options (see L</load>), named POD snippets can
nest freely (even badly).
=item B<=begin test>
=item B<=end test>
The POD between these markers will be seen by B<Pod::Snippets>, but
not by other POD formatters. Otherwise has no effect on the naming or
ignoring of snippets; in particular, if the contents of the section is
not in POD verbatim style, it still gets ignored.
=item B<=begin test "foo">
=item B<=end test "foo">
These have the exact same effect as C<=for test "foo" begin> and
C<=for test "foo" end>, except that other POD formatters will not see
the contents of the block.
=back
( run in 1.022 second using v1.01-cache-2.11-cpan-49f99fa48dc )