view release on metacpan or search on metacpan
lib/API/Octopart.pm view on Meta::CPAN
The cache age (in days) before re-querying octopart. Defaults to 30 days.
=item * query_limit: die if too many API requests are made.
Defaults to no limit. I exhasted 20,000 queries very quickly due to a bug!
This might help with that, set to a reasonable limit while testing.
=item * ua_debug => 1
User Agent debugging. This is very verbose and provides API communication details.
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/API/ParallelsWPB/Mock.pm view on Meta::CPAN
use strict;
use warnings;
use base 'API::ParallelsWPB';
# ABSTRACT: mock for testing API::ParallelsWPB
# VERSION
# AUTHORITY
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/Plesk/Mock.pm view on Meta::CPAN
__END__
=head1 NAME
API::Plesk::Mock - Module for testing API::Plesk without sending real requests to Plesk API.
=head1 SYNOPSIS
use API::Plesk::Mock;
lib/API/Plesk/Mock.pm view on Meta::CPAN
$api->mock_response($some_response_xml);
$api->mock_error($some_error_text);
=head1 DESCRIPTION
Module for testing API::Plesk without sending real requests to Plesk API.
=head1 METHODS
=over 3
view all matches for this distribution
view release on metacpan or search on metacpan
- Fix syntax error in Build.PL :(
- Fix errors in documentation
1.02 Jun 8 13:32:18 SAMST 2008
- Full support all ways of choosing a Plesk server, where the client will be created (autoselect and manual)
1.03 Jun 14 12:16:24 SAMST 2008
- Fix documentation, add tests
1.04 Jun 22 05:21:18 SAMST 2008
- Add ability to attaching domains and accounts to templates
1.05 Jul 29 23:33:12 SAMST 2008
- New function -- get all domains from Expand
1.06 Jul 31 17:34:55 SAMST 2008
view all matches for this distribution
view release on metacpan or search on metacpan
use Test::More;
eval "use Test::Pod 1.00";
plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
all_pod_files_ok();
view all matches for this distribution
view release on metacpan or search on metacpan
ReviewBoard.pm view on Meta::CPAN
my $request = new HTTP::Request('GET', $userlink);
$self->{_cookie_jar}->add_cookie_header($request);
my $response = $self->{_useragent}->simple_request($request);
my $xml = $response->as_string;
$xml =~ m/.*"target_people": (.*), "testing_done".*/;
my $name = $1;
my @arr;
my $count = @arr = $name =~ /"title": "(\w+)"/g;
my $reviewers = \@arr;
view all matches for this distribution
view release on metacpan or search on metacpan
As a last resort, you can manually install it. Download the tarball, untar it,
then build it:
% perl Makefile.PL
% make && make test
Then install it:
% make install
view all matches for this distribution
view release on metacpan or search on metacpan
As a last resort, you can manually install it. Download the tarball, untar it,
then build it:
% perl Makefile.PL
% make && make test
Then install it:
% make install
view all matches for this distribution
view release on metacpan or search on metacpan
As a last resort, you can manually install it. Download the tarball, untar it,
then build it:
% perl Makefile.PL
% make && make test
Then install it:
% make install
view all matches for this distribution
view release on metacpan or search on metacpan
cpanfile
lib/API/Vultr.pm
Makefile.PL
MANIFEST This list of files
README.md
t/01-test.t
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
view all matches for this distribution
view release on metacpan or search on metacpan
As a last resort, you can manually install it. Download the tarball, untar it,
then build it:
% perl Makefile.PL
% make && make test
Then install it:
% make install
view all matches for this distribution
view release on metacpan or search on metacpan
package t::test;
use strict;
use warnings;
use Path::Class;
use Test::More;
use Test::Fatal qw(lives_ok dies_ok exception);
use Test::Deep;
use Test::Deep::JSON;
END { $package->runtests }
];
eval $code;
die $@ if $@;
}
view all matches for this distribution
view release on metacpan or search on metacpan
script_files => [glob('script/*'), glob('bin/*')],
c_source => [qw()],
PL_files => {},
test_files => ((-d '.git' || $ENV{RELEASE_TESTING}) && -d 'xt') ? 't/ xt/' : 't/',
recursive_test_files => 1,
);
if (-d 'share') {
$args{share_dir} = 'share';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
$| = 1; #make the pipe hot
$Data::Dumper::Indent = 1;
=head1 NAME
APP::REST::RestTestSuite - Suite for testing restful web services
=head1 VERSION
Version 0.03
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
=head1 SYNOPSIS
use APP::REST::RestTestSuite;
my $suite = APP::REST::RestTestSuite->new();
$suite->execute_test_cases( $suite->get_test_cases() );
my ( $cases_in_config, $executed, $skipped, $passed, $failed ) =
$suite->get_result_summary();
#OR
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
my $suite = APP::REST::RestTestSuite->new(
REST_CONFIG_FILE => <config file>,
LOG_FILE_PATH => <path>,
);
$suite->execute_test_cases( $suite->get_test_cases() );
my ( $cases_in_config, $executed, $skipped, $passed, $failed ) =
$suite->get_result_summary();
=head1 DESCRIPTION
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
$self->_init(%args);
return $self;
}
=head2 get_test_cases
=cut
sub get_test_cases {
my ( $self, %args ) = @_;
if ( $self->{test_cases} ) {
return %{ $self->{test_cases} };
} else {
return undef;
}
}
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
sub get_result_summary {
my ( $self, %args ) = @_;
return (
$self->{test_result_log}->{test_cases_in_config},
$self->{test_result_log}->{test_cases_exececuted},
$self->{test_result_log}->{test_cases_skipped},
$self->{test_result_log}->{test_cases_passed},
$self->{test_result_log}->{test_cases_failed},
);
}
=head2 validate_test_cases
=cut
sub validate_test_cases {
my ($self) = shift;
my $err = undef;
unless (@_) {
$err = "There is no test cases defined to execute.\n";
} elsif ( ( (@_) % 2 ) == 1 ) {
$err =
"Test cases are not properly configured in '"
. $self->get_config_file()
. "'\nDefine test cases properly.\nPlease see the README file for more info.\n";
}
return $err if ($err);
my %test_cases = @_;
my @spec = sort qw(
test_case
uri
request_content_type
request_method
request_body
response_status
execute
response_content_type
);
#below two are not mandatory for a test case as of now; if required add them to above array
# response_header
# response_body
foreach my $count ( sort { $a <=> $b } keys(%test_cases) ) {
my $tc = $test_cases{$count};
my @keys = sort keys %{$tc};
no warnings;
$err .= "Test case '$tc->{test_case}' not properly defined\n"
unless ( _compare_arrays( \@spec, \@keys ) );
}
$err .= "Please see the README file to see the correct format.\n" if ($err);
return $err;
}
=head2 execute_test_cases
=cut
sub execute_test_cases {
my ($self) = shift;
#expects an hash with keys as test case number and value as hash ref with test
#specification; validate that before trying to execute them.
my $err = $self->validate_test_cases(@_);
die "ERROR: $err\n" if ($err);
my %test_cases = @_;
my $ua = LWP::UserAgent->new;
$ua->agent("RTAT/$VERSION");
$ua->timeout(90); # in seconds
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
print STDERR "\nTest Suite executed on $self->{endpoint}\n";
print $fh "\nTest Suite executed on $self->{endpoint}\n";
print $err_fh "\nTest Suite executed on $self->{endpoint}\n";
foreach my $count ( sort { $a <=> $b } keys(%test_cases) ) {
my $tc = $test_cases{$count};
$config++;
print $fh "\n", LINE, "\n";
if ( $tc->{execute} && ( $tc->{execute} =~ /no/i ) ) {
print $fh "\nSkipping Test case $count => $tc->{test_case} \n";
$skip++;
next;
}
$uri = qq|$self->{rest_uri_base}| . qq|$tc->{uri}|;
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
if ( $username && $password );
$request->content_type($req_content_type);
$request->content_length( length($req_body) );
}
print STDERR "Executing Test case $count => $tc->{test_case}";
print $fh "Executing Test case $count => $tc->{test_case}";
my $start_time = time;
$response = $ua->request($request);
$total++;
my $exec_time = $self->delta_time( start_time => $start_time );
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
m/$respose_content_type/ )
{
$failed = 1;
print $err_fh "\n", LINE, "\n";
print $err_fh
"Executing Test case $count => $tc->{test_case}";
print $err_fh
"\n*********ATTENTION CONTENT TYPE ERROR ******";
print $err_fh
"\n\nExpected content_type is $expected_response_content_type\n";
print $err_fh
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
}
($failed) ? $fail++ : $pass++;
} else {
$fail++;
print $err_fh "\n", LINE, "\n";
print $err_fh "Executing Test case $count => $tc->{test_case}";
$self->_print_logs(
fh => $err_fh,
uri => $uri,
method => $method,
req_body => $req_body,
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
#convert milli seconds to seconds for total_exec_time
$total_response_time = sprintf( "%.2f", $total_response_time / 1000 );
my $avg_response_time =
sprintf( "%.2f", ( $total_response_time * 1000 ) / $total );
print STDERR "\nComplete test case report is in $self->{file}->{log_file}";
print STDERR
"\nFailed test case report is in $self->{file}->{err_log_file}\n\n";
print STDERR
"Response time of $total web service calls => [$total_response_time seconds]\n";
print STDERR
"Average response time of a web service => [$avg_response_time milli seconds]\n\n";
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
{
print $fh qq|</textarea></BODY></HTML>|;
print $err_fh qq|</textarea></BODY></HTML>|;
}
$self->{test_result_log} = {
test_cases_in_config => $config,
test_cases_exececuted => $total,
test_cases_skipped => $skip,
test_cases_passed => $pass,
test_cases_failed => $fail,
};
close($fh);
close($err_fh);
}
=head2 execute_test_cases_in_parallel
=cut
sub execute_test_cases_in_parallel {
my ($self) = shift;
#Code expects an hash with keys as test case number and value as hash ref with test
#specification; validate that before trying to execute them.
my $err = $self->validate_test_cases(@_);
die "ERROR: $err\n" if ($err);
my %test_cases = @_;
# use my customized user agent for parallel invokes
my $pua = APP::REST::ParallelMyUA->new();
$pua->agent("RTAT/$VERSION");
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
print STDERR "\nTest Suite executed on $self->{endpoint}\n";
print $fh "\nTest Suite executed on $self->{endpoint}\n";
my @reqs;
foreach my $count ( sort { $a <=> $b } keys(%test_cases) ) {
my $tc = $test_cases{$count};
$config++;
if ( $tc->{execute} =~ /no/i ) {
print $fh "\nSkipping Test case $count => $tc->{test_case} \n";
$skip++;
next;
}
$uri = qq|$self->{rest_uri_base}| . qq|$tc->{uri}|;
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
$total_response_time = sprintf( "%.2f", $total_response_time / 1000 );
my $avg_response_time =
sprintf( "%.2f", ( $total_response_time * 1000 ) / $total );
print STDERR
"\n\n\nComplete test case report is in $self->{file}->{log_file}";
print STDERR
"\n\nResponse time of $total web service calls => [$total_response_time seconds]\n";
print STDERR
"Average response time of a web service => [$avg_response_time milli seconds]\n\n";
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
&& ( $self->{html_log_required} =~ /yes/i ) )
{
print $fh qq|</textarea></BODY></HTML>|;
}
$self->{test_result_log} = {
test_cases_in_config => $config,
test_cases_exececuted => $total,
test_cases_skipped => $skip,
test_cases_passed => $pass,
test_cases_failed => $fail,
};
close($fh);
}
=head2 get_sample_test_suite
=cut
sub get_sample_test_suite {
my ( $self, %args ) = @_;
$self->_init_sample_config_file();
my $file = $self->{file};
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
my $fh = $self->get_config_file_handle();
my @buffer = ();
my @start_end_buffer = ();
my ( $start_case, $end_case, $test_no ) = (undef) x 3;
my ( $start_common, $end_common ) = (undef) x 2;
my ( $start_http_code, $end_http_code ) = (undef) x 2;
my ( $start_tag, $lines_between, $end_tag ) = (undef) x 3;
my $separator = ":"; # separator used in config file for key/value pair
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
push (@{$file->{config_file_content}} , $_);
_trim( chomp($_) );
next if ( $_ =~ m/^#+$/ || $_ =~ m/^\s*$/ || $_ =~ m/^#\s+/ );
last if ( $_ =~ m/^#END_OF_CONFIG_FILE\s*$/ );
## Process common configuration for all test cases
if ( $_ =~ m/^#START_COMMON_CONFIG\s*$/ ) {
$start_common = 1;
next;
}
$end_common = 1 if ( $_ =~ m/^#END_COMMON_CONFIG\s*$/ );
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
$end_common = 0;
} elsif ( !$start_common && $end_common ) {
die "ERROR in config file format\n";
}
## Process test cases
if ( $_ =~ m/^#START_TEST_CASE\s*$/ ) {
$start_case = 1;
next;
}
$end_case = 1 if ( $_ =~ m/^#END_TEST_CASE\s*$/ );
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
$end_tag = 0;
$lines_between = 0;
}
if ( $start_case && $end_case ) {
$test_no++;
foreach my $line (@buffer) {
my @val = split( $separator, $line );
$self->{test_cases}->{$test_no}->{ _trim( $val[0] ) } =
_trim( $val[1] );
}
# add all those in between [START] and [END] tage to the respective key
while ( my ( $key, $value ) = each %start_end_hash ) {
$self->{test_cases}->{$test_no}->{$key} = $value;
}
%start_end_hash = ();
@buffer = ();
$start_case = 0;
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
__DATA__
# RestTestSuite supports config file of below format.
# All values in LHS of ':' are case sensitive.
# Every test case should be within the '#START_TEST_CASE' and '#END_TEST_CASE' block.
# Create application specific config file in below format and pass the
# full path of file as an argument to the constructor
# for POST and PUT methods you need to supply the request body within
# [START] and [END] tags
# request_body :
# [START]
# xml or json or form based
# [END]
################
#Set below values to configure the base URL for all test cases
####################
#START_COMMON_CONFIG
################################################################################
endpoint : www.thomas-bayer.com
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
##################
#####################
#START_TEST_CASE
#####################
test_case : get_product
uri : /PRODUCT/49
request_content_type : application/xml
request_method : GET
request_body :
response_status : 200
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
my $self = $class->new(@_);
my $who = $self->_caller;
#-------------------------------------------------------------
# all of the following checks should be included in import(),
# to allow "eval 'require Module::Install; 1' to test
# installation of Module::Install. (RT #51267)
#-------------------------------------------------------------
# Whether or not inc::Module::Install is actually loaded, the
# $INC{inc/Module/Install.pm} is what will still get set as long as
view all matches for this distribution
view release on metacpan or search on metacpan
inc/MyBuilder.pm view on Meta::CPAN
sub _auto_bugtracker {
'http://rt.cpan.org/NoAuth/Bugs.html?Dist=' . shift->dist_name;
}
sub ACTION_testauthor {
my $self = shift;
$self->test_files( 'xt/author' );
$self->ACTION_test;
}
sub ACTION_critic {
exec qw( perlcritic -1 -q -profile perlcriticrc lib/ ), glob 't/*.t';
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Arc/Connection.pm view on Meta::CPAN
## send a line. (protocol)
## This function sends a command line to the ARCv2 socket.
##in> ... (line)
##out> true if writing has succeeded, otherwise false.
##eg> $this->_SendLine($cmd,"test");
sub _SendLine
{
my $this = shift;
return unless @_;
my $line = join("",@_);
view all matches for this distribution
view release on metacpan or search on metacpan
Humans can ignore this release.
Fix t/91-pod-coverage.t, only to raise Kwalitee.
1.00 2011-11-04 DOLMEN (Olivier Mengué)
Add an example: examples/01.pl.
Add tests (only to raise Kwalitee and rank in the CPANTS game)
0.01 2011-09-04 DOLMEN (Olivier Mengué)
Initial release. No tests yet.
view all matches for this distribution
view release on metacpan or search on metacpan
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
view all matches for this distribution
view release on metacpan or search on metacpan
script_files => [glob('script/*'), glob('bin/*')],
c_source => [qw()],
PL_files => {},
test_files => ((-d '.git' || $ENV{RELEASE_TESTING}) && -d 'xt') ? 't/ xt/' : 't/',
recursive_test_files => 1,
);
if (-d 'share') {
$args{share_dir} = 'share';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ARGV/OrDATA.pm view on Meta::CPAN
B<wouldn't rewind it>, i.e. it would continue from where you stopped
(see t/04-unimport.t).
=head2 Why?
I use this technique when solving programming contests. The sample
input is usually small and I don't want to waste time by saving it
into a file.
=head1 EXPORT
view all matches for this distribution
view release on metacpan or search on metacpan
0.02 2015-02-04 21:30:00
- Breakage: now the arguments are JSONY compatible
(thanks to Matt S Trout for the suggestion)
- Refactor parsing code
- Better errors
- More tests
0.03 2015-08-05 23:45:00
- Compatibility with pre 5.14 Perls (GH Issue #1)
0.04 2018-09-18 22:33:00
- Migrate to Moo and Type::Tiny
0.05 2018-09-18 23:10:00
view all matches for this distribution
view release on metacpan or search on metacpan
Revision history for ARGV::URL.
0.93 2011-11-09 DOLMEN (Olivier Mengué)
Add tests, just for Kwalitee.
More DZ plugins => META.json, perl prereq
Add an example: examples/sherlock.pl
0.92 2011-09-04 DOLMEN (Olivier Mengué)
Add tests.
Fixes a minor POD error.
0.91 2011-08-12 DOLMEN (Olivier Mengué)
Fixing mistakes of a release late in the night:
- missing $VERSION
- missing Github meta
0.90 2011-08-12 DOLMEN (Olivier Mengué)
Initial release. No tests yet.
view all matches for this distribution
view release on metacpan or search on metacpan
t/ARGV-readonly.t view on Meta::CPAN
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl ARGV-readonly.t'
#########################
# change 'tests => 1' to 'tests => last_test_to_print';
use Test;
BEGIN { plan tests => 1 };
use ARGV::readonly;
ok(1); # If we made it this far, we're ok.
#########################
# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ARS/Simple.pm view on Meta::CPAN
croak(__PACKAGE__ . " object initialisation failed, server, user and password are required\n");
}
}
# GG test - need to find and store the current value of AR_SERVER_INFO_MAX_ENTRIES
# so we can set reset_limit if not defined
#my %s = ars_GetServerInfo($self->{ctl});
#print Dumper(\%s);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ARSObject.pm view on Meta::CPAN
# -form =>{form attrs}, -table=>{table attrs}, -tr=>{tr attrs}, -td=>{}, -th=>{}
my ($s, %a) =$_[0];
my $i =1;
while (ref($_[$i]) ne 'ARRAY') {$a{$_[$i]} =$_[$i+1]; $i +=2};
$s->cgi->start_form(-method=>'POST',-action=>'', $a{-form} ? %{$a{-form}} : ())
# ,-name=>'test'
.$s->{-cgi}->table($a{-table} ? $a{-table} : (), "\n"
.join(''
, map { my $r =$_;
$s->{-cgi}->Tr($a{-tr} ? $a{-tr} : (), "\n"
.join(''
view all matches for this distribution
view release on metacpan or search on metacpan
example/GetCharMenu.pl view on Meta::CPAN
# $Log: GetCharMenu.pl,v $
# Revision 1.8 2003/03/28 05:51:56 jcmurphy
# more 5.x edits
#
# Revision 1.7 2001/10/24 14:21:27 jcmurphy
# MergeEntry doc update, minor test/example tweaks
#
# Revision 1.6 2000/05/24 18:05:26 jcmurphy
# primary ars4.5 integration in this checkpoint.
#
# Revision 1.5 1998/10/14 13:55:34 jcmurphy
view all matches for this distribution
view release on metacpan or search on metacpan
applications/archive.pl view on Meta::CPAN
# ---------------------------------------------------------------------------------------------------------
# 2011/mm/dd, v3.002.003, archive.pl for ASNMTAP::Applications
# ---------------------------------------------------------------------------------------------------------
use strict;
use warnings; # Must be used in test mode only. This reduces a little process speed
#use diagnostics; # Must be used in test mode only. This reduces a lot of process speed
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BEGIN { if ( $ENV{ASNMTAP_PERL5LIB} ) { eval 'use lib ( "$ENV{ASNMTAP_PERL5LIB}" )'; } }
applications/archive.pl view on Meta::CPAN
sub doBackupCsvSqlErrorWeekDebugReport {
my ($RESULTSPATH, $DEBUGDIR, $REPORTDIR, $gzipEpoch, $removeAllNokEpoch, $removeGzipEpoch, $removeDebugEpoch, $removeReportsEpoch, $removeWeeksEpoch, $firstDayOfWeekEpoch, $yesterdayEpoch, $currentEpoch) = @_;
print EMAILREPORT "\nDo backup, csv, sql, error, week, and debug files:\n--------------------------------------------------\n" unless ( $debug );
my ($darchivelist, $dtest, $pagedir, $ttest, $command, $rvOpendir, $path, $filename, $debugPath, $debugFilename, $reportPath, $reportFilename, $weekFilename);
my @files = ();
foreach $darchivelist (@archivelisttable) {
($pagedir, $ttest) = split(/\#/, $darchivelist, 2);
my @stest = split(/\|/, $ttest);
$path = $RESULTSPATH .'/'. $pagedir;
$debugPath = $path .'/'. $DEBUGDIR;
$reportPath = $path .'/'. $REPORTDIR;
if ($debug) {
print "\n", "<$RESULTSPATH><$pagedir><$path><$DEBUGDIR><$REPORTDIR>\n"
} else {
print EMAILREPORT "\nPlugin: '$ttest', results directory: '$path'\n";
}
$rvOpendir = opendir(DIR, $path);
if ($rvOpendir) {
applications/archive.pl view on Meta::CPAN
closedir(DIR);
}
}
foreach $dtest (@stest) {
my ($catalogID_uKey, $test) = split(/\#/, $dtest);
($command, undef) = split(/\.pl/, $test);
my ($catalogID, $uKey) = split(/_/, $catalogID_uKey);
unless ( defined $uKey ) {
$uKey = $catalogID;
$catalogID = $CATALOGID;
applications/archive.pl view on Meta::CPAN
}
my ( $tWeek, $tYear ) = get_week('yesterday');
$weekFilename = get_year('yesterday') ."w$tWeek-$command-$catalogID_uKey-csv-week.txt";
if (-e "$path/$weekFilename") { unlink ($path.'/'.$weekFilename); }
print "Test : <$dtest>\n" if ($debug);
foreach $filename (@files) {
print "Filename : <$filename>\n" if ($debug >= 2);
catAllCsvFilesYesterdayWeek ($firstDayOfWeekEpoch, $yesterdayEpoch, $catalogID_uKey, $command, $path, $weekFilename, $filename);
removeAllNokgzipCsvSqlErrorWeekFilesOlderThenAndMoveToBackupShare ($gzipEpoch, $removeAllNokEpoch, $removeGzipEpoch, $removeDebugEpoch, $removeWeeksEpoch, $catalogID_uKey, $command, $path, $filename);
view all matches for this distribution
view release on metacpan or search on metacpan
=head1 SYNOPSIS
use strict;
use ASP qw(:strict);
print "Testing, testing.<BR><BR>";
my $item = param('item');
if($item eq 'Select one...') {
die "Please select a value from the list.";
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
my @c = caller();
if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
}
# In automated testing, always use defaults
if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
local $ENV{PERL_MM_USE_DEFAULT} = 1;
goto &ExtUtils::MakeMaker::prompt;
} else {
goto &ExtUtils::MakeMaker::prompt;
inc/Module/Install/Makefile.pm view on Meta::CPAN
sub inc {
my $self = shift;
$self->makemaker_args( INC => shift );
}
my %test_dir = ();
sub _wanted_t {
/\.t$/ and -f $_ and $test_dir{$File::Find::dir} = 1;
}
sub tests_recursive {
my $self = shift;
if ( $self->tests ) {
die "tests_recursive will not work if tests are already defined";
}
my $dir = shift || 't';
unless ( -d $dir ) {
die "tests_recursive dir '$dir' does not exist";
}
%test_dir = ();
require File::Find;
File::Find::find( \&_wanted_t, $dir );
$self->tests( join ' ', map { "$_/*.t" } sort keys %test_dir );
}
sub write {
my $self = shift;
die "&Makefile->write() takes no arguments\n" if @_;
inc/Module/Install/Makefile.pm view on Meta::CPAN
my $args = $self->makemaker_args;
$args->{DISTNAME} = $self->name;
$args->{NAME} = $self->module_name || $self->name;
$args->{VERSION} = $self->version;
$args->{NAME} =~ s/-/::/g;
if ( $self->tests ) {
$args->{test} = { TESTS => $self->tests };
}
if ($] >= 5.005) {
$args->{ABSTRACT} = $self->abstract;
$args->{AUTHOR} = $self->author;
}
inc/Module/Install/Makefile.pm view on Meta::CPAN
local *MAKEFILE;
open MAKEFILE, "< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
my $makefile = do { local $/; <MAKEFILE> };
close MAKEFILE or die $!;
$makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /;
$makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g;
$makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
$makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
$makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m;
view all matches for this distribution