view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
$sqlite_base =~ /=(.*)/;
$sqlite_base = $1;
$sqlite_lib = File::Spec->catdir( $sqlite_base, 'lib' );
$sqlite_inc = File::Spec->catdir( $sqlite_base, 'include' );
}
if ( $sqlite_local = (grep(/USE_LOCAL_SQLITE=.*/, @ARGV))[0] ) {
$sqlite_local =~ /=(.*)/;
$sqlite_local = "$1" ? 1 : 0;
if ( $sqlite_local ) {
# Keep these from making into CFLAGS/LDFLAGS
undef $sqlite_lib;
view all matches for this distribution
view release on metacpan or search on metacpan
$rv;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
$sqlite_base =~ /=(.*)/;
$sqlite_base = $1;
$sqlite_lib = File::Spec->catdir($sqlite_base, 'lib');
$sqlite_inc = File::Spec->catdir($sqlite_base, 'include');
}
if ($force_local = (grep(/USE_LOCAL_SQLITE=.*/, @ARGV))[0]) {
$force_local =~ /=(.*)/;
$force_local = "$1" ? 1 : 0;
if ($force_local) {
undef $sqlite_lib; # Keep these from making into CFLAGS/LDFLAGS
undef $sqlite_inc;
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
$sqlite_base =~ /=(.*)/;
$sqlite_base = $1;
$sqlite_lib = File::Spec->catdir( $sqlite_base, 'lib' );
$sqlite_inc = File::Spec->catdir( $sqlite_base, 'include' );
}
if ( $sqlite_local = (grep(/USE_LOCAL_SQLITE=.*/, @ARGV))[0] ) {
$sqlite_local =~ /=(.*)/;
$sqlite_local = "$1" ? 1 : 0;
if ( $sqlite_local ) {
# Keep these from making into CFLAGS/LDFLAGS
undef $sqlite_lib;
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
# perlcriticrc uses Config::Tiny, which does not support nesting
if (-f ".perlcriticrc" && -s "$ENV{HOME}/.perlcriticrc") {
open my $fh, ">", ".perlcriticrc";
print $fh do {
local (@ARGV, $/) = ("$ENV{HOME}/.perlcriticrc"); <> };
print $fh join "\n" => "",
"[-Documentation::RequireLinkedURLs]", # L<DBI|http://...] requires 5.12
"[-Modules::ProhibitMultiplePackages]",
"[-Modules::RequireExplicitPackage]", # use 5.008000
"[-RegularExpressions::ProhibitFixedStringMatches]", # deliberate
view all matches for this distribution
view release on metacpan or search on metacpan
README.ingres view on Meta::CPAN
ListTables stuff. Therefore the "advanced" tests will fail.
Expect the test output to look like:
% make test
PERL_DL_NONLAZY=1 /usr/local/perl-5.004_02/bin/perl -I./blib/arch -I./blib/lib -I/usr/local/perl-5.004_02/lib/sun4-solaris/5.00402 -I/usr/local/perl-5.004_02/lib -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/00base............ok
t/10dsnlist.........skipping test on this platform
t/20createdrop......ok
t/30insertfetch.....ok
t/40bindparam.......skipping test on this platform
view all matches for this distribution
view release on metacpan or search on metacpan
}
sub _dmp {
my $code = shift;
my ( $ds, $stderr_string );
local @ARGV; # prevents Perl::Tidy craziness
my $error = Perl::Tidy::perltidy(
source => \$code,
destination => \$ds,
stderr => \$stderr_string
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBI/Shell.pm view on Meta::CPAN
unless $sh->{batch};
}
}
}
local ($|) = 1;
# plug-ins should remove options they recognise from (localized) @ARGV
# by calling Getopt::Long::GetOptions (which is already in pass_through mode).
foreach my $pi (@pi) {
local *ARGV = $sh->{unhandled_options};
$pi->init($sh);
}
lib/DBI/Shell.pm view on Meta::CPAN
# environment and config settings.
#
$DB::single = 1;
local (@ARGV) = @args;
my @options = values %{ $sh->{options} };
Getopt::Long::config('pass_through'); # for plug-ins
unless (GetOptions($sh, 'help|h', @options)) {
$class->usage;
croak "DBI::Shell aborted.\n";
view all matches for this distribution
view release on metacpan or search on metacpan
$rv || 0;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/BulkUtil.pm view on Meta::CPAN
my ($self, $table, $file, $cols, $opts) = @_;
my $d = $opts->{Delimiter} || $self->{DELIMITER};
my $dre = quotemeta($d);
local ($_, $., $ARGV, *ARGV);
local ( $^I, @ARGV ) = ( '.bak', $file );
local $/ = $opts->{RowDelimiter} || "\n";
my $done;
while ( <> ) {
print join($d, @$cols), $/ if !$done++ && $opts->{Header};
lib/DBIx/BulkUtil.pm view on Meta::CPAN
$opts = pop @_;
}
my $delimiter = $opts->{Delimiter} || $self->{DELIMITER} || '|';
my $dre = quotemeta($delimiter);
local ($_, $., $ARGV, *ARGV);
local ( $^I, @ARGV ) = ( '.bak', $file );
local $/ = $opts->{RowDelimiter} || $/;
while ( <> ) {
1 while s!(^|$dre)($mon_re)\s{1,2}(\d{1,2})\s(\d{4})\s\s?(\d\d?):(\d\d):(\d\d):(\d{3})([AP])M($dre|$/)!
$1 .
sprintf( '%04d-%02d-%02d %02d:%02d:%02d.%03d',
lib/DBIx/BulkUtil.pm view on Meta::CPAN
my $rd = $opts->{RowDelimiter};
my $year_mask = $opts->{Year2Mask} || 'YY';
local ($., $_, $ARGV, *ARGV);
local $/ = $rd if $rd;
local @ARGV = @$files;
my $row_cnt;
my (%remaining, %got);
$remaining{$_}++ for keys %$is_date;
view all matches for this distribution
view release on metacpan or search on metacpan
t/09-Changeset-App.t view on Meta::CPAN
is($cmd->{'config'}->{'test2'}, 'testing', 'Got correct test2 value from test2.yml during reverse array test');
is($cmd->{'config'}->{'test3'}, 1, 'Got correct test3 value from test1.yml during array reverse test');
{
local @ARGV = qw(commands);
my ($output) = Test::Output::output_from(sub { $cmd->run });
for my $name (qw(create update compare applied bootstrap commands help)) {
like($output, qr/^\s+\Q$name\E/sm, "$name command in listing");
}
}
### test create options
{
local @ARGV = qw(help create);
my ($output) = Test::Output::output_from(sub { $cmd->run });
### do we have the default options
for my $name (qw(help prompt)) {
t/09-Changeset-App.t view on Meta::CPAN
}
}
### test create option validation
{
local @ARGV = qw(create);
eval { $cmd->run; };
### check for complaint about changeset location
like($@, qr/valid changeset location/, 'got complaint about changeset location from create');
}
### test create option validation
{
local @ARGV = qw(create --location=./t/data);
eval { $cmd->run; };
### check for complaint about missing delta name
like($@, qr/valid changeset name/, 'got complaint about delta name from create');
}
### test create
{
local @ARGV = qw(create --location=./t/data --template=./t/add_template.txt moose);
my $output;
eval { ($output) = Test::Output::output_from(sub { $cmd->run }); };
### check that we get the create filename message
t/09-Changeset-App.t view on Meta::CPAN
unlink ( $created );
}
### test bootstrap options
{
local @ARGV = qw(help bootstrap);
my ($output) = Test::Output::output_from(sub { $cmd->run });
### do we have the other added options
for my $name (qw(history_db_dsn history_db_user history_db_password)) {
t/09-Changeset-App.t view on Meta::CPAN
}
}
### test bootstrap option validation
{
local @ARGV = qw(bootstrap);
eval { $cmd->run; };
### check for complaint about missing history_db_dsn
like($@, qr/history_db_dsn/, 'got complaint about history_db_dsn from bootstrap');
}
### test valid bootstrap
{
local @ARGV = ('bootstrap', "--history_db_dsn=".$test_dsn);
my $output;
eval { ($output) = Test::Output::output_from(sub { $cmd->run; }); };
if ( $@ ) { diag($@); }
t/09-Changeset-App.t view on Meta::CPAN
like($output, qr/complete./, 'can do a valid bootstrap with DBIX_UPDATE_CONFIG');
}
### test compare options
{
local @ARGV = qw(help compare);
my ($output) = Test::Output::output_from(sub { $cmd->run });
### do we have the other added options
for my $name (qw(location type like history_db_dsn history_db_user history_db_password)) {
t/09-Changeset-App.t view on Meta::CPAN
}
}
### test compare option validation
{
local @ARGV = qw(compare);
eval { $cmd->run; };
### check for complaint about changeset location
like($@, qr/valid changeset location/, 'got complaint about changeset location from compare');
t/09-Changeset-App.t view on Meta::CPAN
like($@, qr/history_db_dsn/, 'got complaint about history_db_dsn from compare');
}
### test update options
{
local @ARGV = qw(help update);
my ($output) = Test::Output::output_from(sub { $cmd->run });
### do we have the other added options
for my $name (qw(loader location type db_user db_password db_host db_name history_db_dsn history_db_user history_db_password)) {
t/09-Changeset-App.t view on Meta::CPAN
}
}
### test compare option validation
{
local @ARGV = qw(update);
eval { $cmd->run; };
### check for complaint about changeset location
like($@, qr/valid changeset location/, 'got complaint about changeset location from update');
t/09-Changeset-App.t view on Meta::CPAN
eval { $cmd->run; };
### check for complaint about missing history_db_dsn
like($@, qr/history_db_dsn/, 'got complaint about history_db_dsn from update');
local @ARGV = ('update', '--location=./t/data', '--history_db_dsn='.$test_dsn);
eval { $cmd->run; };
### check for complaint about missing db_name
like($@, qr/db_name/, 'got complaint about history_db_dsn from update');
t/09-Changeset-App.t view on Meta::CPAN
my $db = $ENV{DBD_MYSQL_DBNAME} || 'test';
my $user = $ENV{DBD_MYSQL_USER} || '';
my $pass = $ENV{DBD_MYSQL_PASSWD} || '';
local @ARGV = ('update', '--location=./t/data', '--history_db_dsn='.$test_dsn, '--db_name='.$db, '--db_user='.$user, '--db_password='.$pass);
my $output;
diag(join(' ', @ARGV));
eval { ($output) = Test::Output::output_from(sub { $cmd->run }); };
# eval { $cmd->run };
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm view on Meta::CPAN
)};
for my $filename (@files) {
# We ignore sql for now (till I figure out what to do with it)
if ( $filename =~ /^(.+)\.pl$/ ) {
my $filedata = do { local( @ARGV, $/ ) = $filename; <> };
no warnings 'redefine';
my $fn = eval "$filedata";
use warnings;
lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm view on Meta::CPAN
}
sub _coderefs_per_files {
my ($self, $files) = @_;
no warnings 'redefine';
[map eval do { local( @ARGV, $/ ) = $_; <> }, @$files]
}
sub _prepare_changegrade {
my ($self, $from_version, $to_version, $version_set, $direction) = @_;
my $schema = $self->schema;
view all matches for this distribution
view release on metacpan or search on metacpan
plan skip_all => 'DBICM_TEST_HELP not set'
unless $ENV{DBICM_TEST_HELP} || $ENV{AUTHOR_MODE};
ok(my $r = Capture::Tiny::capture_stdout {
local @ARGV = ("help");
DBIx::Class::Migration::Script->run_with_options;
});
like $r,
qr/DBIx::Class::Migration::Script::Help - Summary of the commands/sm,
view all matches for this distribution
view release on metacpan or search on metacpan
t_dbic/lib/DBICTest.pm view on Meta::CPAN
if ($ENV{"DBICTEST_SQLT_DEPLOY"}) {
$schema->deploy($args);
} else {
my $filename = Path::Class::File->new(__FILE__)->dir
->file('sqlite.sql')->stringify;
my $sql = do { local (@ARGV, $/) = $filename ; <> };
for my $chunk ( split (/;\s*\n+/, $sql) ) {
if ( $chunk =~ / ^ (?! --\s* ) \S /xm ) { # there is some real sql in the chunk - a non-space at the start of the string which is not a comment
$schema->storage->dbh_do(sub { $_[1]->do($chunk) }) or print "Error on SQL: $chunk\n";
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/25backcompat.t view on Meta::CPAN
sub _write_custom_content {
my ($schema, $class, $content) = @_;
my $pm = $schema->loader->get_dump_filename($class);
{
local ($^I, @ARGV) = ('.bak', $pm);
while (<>) {
if (/DO NOT MODIFY THIS OR ANYTHING ABOVE/) {
print;
print $content;
}
view all matches for this distribution
view release on metacpan or search on metacpan
maint/travis-ci_scripts/lib/TAP/Harness/IgnoreNonessentialDzilAutogeneratedTests.pm view on Meta::CPAN
my $fn = File::Spec::Unix->catpath( File::Spec->splitpath( $_ ) );
if (my $REs = $frivolous_test_map->{
(first { $fn =~ $_ } keys %$frivolous_test_map ) || ''
}) {
my $slurptest = do { local (@ARGV, $/) = $fn; <> };
$slurptest =~ $_ and push @$skip_tests, $fn and next TESTFILE for @$REs;
}
push @$run_tests, $fn;
}
view all matches for this distribution
view release on metacpan or search on metacpan
examples/Benchmarks/benchmark_hashrefinflator.pl view on Meta::CPAN
and
$^O eq 'linux'
and
-r '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq'
) {
my ($min_freq, $max_freq, $governor) = map { local @ARGV = $_; my $s = <>; chomp $s; $s } qw|
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|;
examples/Benchmarks/benchmark_hashrefinflator.pl view on Meta::CPAN
die "Can't find any commits... something is wrong\n" unless @to_bench;
unshift @to_bench, {
desc => "the current uncommitted HRI...\t\t\t\t",
title => 'CURRENT',
code => do { local (@ARGV, $/) = ($hri_fn); <> },
} if `git status --porcelain $hri_fn`;
printf "\nAbout to benchmark %d HRI variants (%s)\n",
scalar @to_bench,
(join ', ', map { $_->{title} } @to_bench),
view all matches for this distribution
view release on metacpan or search on metacpan
# fdbget: copies a file (or files) from the db
GetOptions("localname=s" => \$localname ) || die Usage();
$|++;
die "fdbget: pass files to copy from DB\n" unless @ARGV;
die "fdbget: can't use --local option with multiple files\n" if (@ARGV > 1 && $localname);
for my $filename (@ARGV) {
$filestore->read_from_db($localname || $filename, $filename);
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Migration/CLI.pm view on Meta::CPAN
use PerlX::Maybe qw( maybe );
use POSIX qw( EXIT_FAILURE EXIT_SUCCESS );
use Try::Tiny qw( catch try );
sub run {
local @ARGV = @_;
my $opts;
my $exitval;
{
local $SIG{ __WARN__ } = sub {
view all matches for this distribution
view release on metacpan or search on metacpan
print " --- hint for $func ---\n", $hint;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
view all matches for this distribution
view release on metacpan or search on metacpan
$rv;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
{
my $our_sub = shift;
my $warn_sub = shift;
local ($^I) = ".bak" ;
local (@ARGV) = shift;
while (<>)
{
print, last if /^__(END|DATA)__/ ;
view all matches for this distribution
view release on metacpan or search on metacpan
$rv;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
$rv;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
$rv;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
easyxs/ppport.h view on Meta::CPAN
$rv || 0;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
easyxs/ppport.h view on Meta::CPAN
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DSP/ppport.h view on Meta::CPAN
$rv;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
lib/DSP/ppport.h view on Meta::CPAN
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
$rv;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
$rv;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
exit 2;
}
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
view all matches for this distribution
view release on metacpan or search on metacpan
t/02-full.t view on Meta::CPAN
route_exists [GET => $route];
response_content_is([GET => $route], 'whatever');
}
my $collector = do {
local (@ARGV, $/) = ($logfile);
<>;
};
# Verify log messages were all logged
for my $level (qw( debug core info warning error )) {
t/02-full.t view on Meta::CPAN
# Verify that core messages are filtered when Dancer's 'log' setting isn't 'core'
# setting log => 'debug';
# truncate($logfile,0);
# response_content_is([GET => "/core"], 'whatever');
# $collector = do {
# local (@ARGV, $/) = ($logfile);
# <>;
# };
# unlike($collector, qr{core-whatever}, 'log line is correct');
ok(unlink($logfile), 'unlinking log file');
view all matches for this distribution