view release on metacpan or search on metacpan
lib/Acme/What.pm view on Meta::CPAN
it in different parts of your code. You can even use:
no Acme::What;
to disable Acme::What for a scope. (The C<what> keyword is still parsed
within the scope, but when the line is executed, it throws a catchable
error.)
=head1 WHY?
It's in the Acme namespace. There is no why.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
# Too far in the future, throw an error.
my $t = time;
if ( $s > $t ) { die <<"END_DIE" }
Your installer $0 has a modification time in the future ($s > $t).
view all matches for this distribution
view release on metacpan or search on metacpan
Author: Konrad Borowski <glitchmr@myopera.com>
Date : 2013-09-21 09:41:41 +0000
Support OLD Perl versions by returning value after croak.
Perl isn't clever enough to notice croak throws exception and thinks
it has to return a value. Now fake value is returned as lvalue - the
only way to access it however is modifying `Carp::croak` to not throw
an exception - however, it's not supported.
Change: a7e6cc7c742b3e713ea8258304e8c0e9f3ddd3ca
Author: Konrad Borowski <glitchmr@myopera.com>
Date : 2013-09-21 09:26:43 +0000
view all matches for this distribution
view release on metacpan or search on metacpan
Acme/landmine version 1.00
==========================
It looks like a scalar/array/hash but if you try to evaluate
it an exception is thrown, with "confess" stacktrace. For
help debugging data structure problems. References to it
are safe though.
INSTALLATION
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Action/CircuitBreaker.pm view on Meta::CPAN
=over
=item step 1
Tests the value of C<_circuit_open_until>. If it is positive and the current
timestamp is before the value, an error is thrown, because the circuit is
still open. If the value is positive, but before the current timestamp,
the circuit is closed (by setting C<_circuit_open_until> to 0) and optionally,
C<on_circuit_close> is run.
=item step 2
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Activator/Config.pm view on Meta::CPAN
$self->{ARGV}->{realm} ||
( $skip_env ? undef : $ENV{ACT_CONFIG_realm} ) ||
'default';
if ( ref( $realm ) ) {
Activator::Exception::Config->throw( 'realm_specified_more_than_once', Dumper( $realm ) );
}
if ( $realm ne 'default' ) {
Activator::Registry->set_default_realm( $realm );
}
lib/Activator/Config.pm view on Meta::CPAN
# define valid config from config files
try eval {
$self->_process_config_files( $realm, $skip_env, $project_is_arg );
};
if ( catch my $e ) {
$e->rethrow;
}
# read environment variables, set any keys found
if ( !$skip_env ) {
my ( $env_key, $env_realm );
lib/Activator/Config.pm view on Meta::CPAN
}
my ( $key, $value ) = split /=/xms, $arg, 2;
if ( !defined $key ) {
Activator::Exception::Config->throw( 'argument',
'invalid',
$arg );
}
# clean up key
lib/Activator/Config.pm view on Meta::CPAN
# figure out what project we are working on
my $project =
$self->{ARGV}->{project} ||
( $project_is_arg ? $self->{BAREWORDS}->[-1] : undef ) ||
( $skip_env ? undef : $ENV{ACT_CONFIG_project} ) ||
Activator::Exception::Config->throw( 'project', 'missing' );
# process these files:
# $ENV{USER}.yml
# <realm>.yml - realm specific settings and defaults
# <project>.yml - project specific settings and defaults
lib/Activator/Config.pm view on Meta::CPAN
my $conf_path = $self->{ARGV}->{conf_path};
if ( ! $conf_path ) {
$conf_path = ( $skip_env ? undef : $ENV{ACT_CONFIG_conf_path} );
if ( !$conf_path ) {
ERROR( "Neither ACT_CONFIG conf_path env var nor --conf_path set");
Activator::Exception::Config->throw( 'conf_path', 'missing' );
}
else {
INFO( "Using ACT_CONFIG_conf_path env var: $conf_path");
}
}
lib/Activator/Config.pm view on Meta::CPAN
if ( exists( $files->{user}->{file} ) ) {
$user_yml = YAML::Syck::LoadFile( $files->{user}->{file} );
}
};
if ( catch my $e ) {
Activator::Exception::Config->throw( 'user_config', 'invalid', $e );
}
try eval {
if ( exists( $files->{realm}->{file} ) ) {
$realm_yml = YAML::Syck::LoadFile( $files->{realm}->{file} );
}
};
if ( catch my $e ) {
Activator::Exception::Config->throw( 'realm_config', 'invalid', $e );
}
try eval {
if ( exists( $files->{project}->{file} ) ) {
$project_yml = YAML::Syck::LoadFile( $files->{project}->{file} );
}
};
if ( catch my $e ) {
Activator::Exception::Config->throw( 'project_config', 'invalid', $e );
}
try eval {
if ( exists( $files->{org}->{file} ) ) {
$org_yml = YAML::Syck::LoadFile( $files->{org}->{file} );
}
};
if ( catch my $e ) {
Activator::Exception::Config->throw( 'org_config', 'invalid', $e );
}
if ( $realm ne 'default' ) {
if ( defined( $user_yml ) && exists( $user_yml->{ $realm } ) ) {
$self->{REGISTRY}->register_hash( 'left', $user_yml->{ $realm }, $realm );
lib/Activator/Config.pm view on Meta::CPAN
# make sure all is kosher
my $test = $self->{REGISTRY}->get_realm( $realm );
if ( !keys %$test ) {
DEBUG( Data::Dumper->Dump( [ $self->{REGISTRY} ], [ qw/ registry / ] ) );
ERROR( "After processing, '$realm' realm should not be empty, but it is!");
Activator::Exception::Config->throw('realm', 'empty', $realm);
}
}
# Override any options in $config with the values in $argv. Sets non-existent keys.
#
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
# Too far in the future, throw an error.
my $t = time;
if ( $s > $t ) { die <<"END_DIE" }
Your installer $0 has a modification time in the future ($s > $t).
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Activiti/Rest/Response.pm view on Meta::CPAN
};
#The operation failed. The operation requires an Authentication header to be set. If this was present in the request, the supplied credentials are not valid or the user is not authorized to perform this operation.
if($code eq "401"){
Activiti::Rest::Error::UnAuthorized->throw($args);
}
#The operation is forbidden and should not be re-attempted. This does not imply an issue with authentication not authorization, it's an operation that is not allowed. Example: deleting a task that is part of a running process is not allowed and w...
elsif($code eq "403"){
Activiti::Rest::Error::Forbidden->throw($args);
}
#The operation failed.The requested resource was not found.
elsif($code eq "404"){
Activiti::Rest::Error::NotFound->throw($args);
}
#The operation failed. The used method is not allowed for this resource. Eg. trying to update (PUT) a deployment-resource will result in a 405 status.
elsif($code eq "405"){
Activiti::Rest::Error::MethodNotAllowed->throw($args);
}
#The operation failed. The operation causes an update of a resource that has been updated by another operation, which makes the update no longer valid. Can also indicate a resource that is being created in a collection where a resource with that ...
elsif($code eq "409"){
Activiti::Rest::Error::Conflict->throw($args);
}
#The operation failed. The request body contains an unsupported media type. Also occurs when the request-body JSON contains an unknown attribute or value that doesn't have the right format/type to be accepted.
elsif($code eq "415"){
Activiti::Rest::Error::UnsupportedMediaType->throw($args);
}
#The operation failed. An unexpected exception occurred while executing the operation. The response-body contains details about the error.
elsif($code eq "500"){
Activiti::Rest::Error::InternalServerError->throw($args);
}
#common error
else{
Activiti::Rest::Error->throw($args);
}
}
my $content_type = $res->header('Content-Type');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Address/PostCode/UserAgent.pm view on Meta::CPAN
=head1 METHODS
=head2 get($url, \%headers)
It requires URL and optionally headers. It returns the standard response.On error
throws exception of type L<Address::PostCode::UserAgent::Exception>.
=cut
sub get {
my ($self, $url, $headers) = @_;
lib/Address/PostCode/UserAgent.pm view on Meta::CPAN
my @caller = caller(1);
@caller = caller(2) if $caller[3] eq '(eval)';
unless ($response->{success}) {
Address::PostCode::UserAgent::Exception->throw({
method => $caller[3],
message => "request to API failed",
code => $response->{status},
reason => $response->{reason},
filename => $caller[1],
view all matches for this distribution
view release on metacpan or search on metacpan
public/vendor/crypto-js/rollups/sha1.js view on Meta::CPAN
code.google.com/p/crypto-js/wiki/License
*/
var CryptoJS=CryptoJS||function(e,m){var p={},j=p.lib={},l=function(){},f=j.Base={extend:function(a){l.prototype=this;var c=new l;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$s...
n=j.WordArray=f.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=m?c:4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var c=this.words,q=a.words,d=this.sigBytes;a=a.sigBytes;this.clamp();if(d%4)for(var b...
32-8*(c%4);a.length=e.ceil(c/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],b=0;b<a;b+=4)c.push(4294967296*e.random()|0);return new n.init(c,a)}}),b=p.enc={},h=b.Hex={stringify:func...
2),16)<<24-4*(d%8);return new n.init(b,c/2)}},g=b.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var b=[],d=0;d<a;d++)b.push(String.fromCharCode(c[d>>>2]>>>24-8*(d%4)&255));return b.join("")},parse:function(a){for(var c=a.length,b=[],d=...
k=j.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new n.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=r.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,b=c.words,...
a._data=this._data.clone();return a},_minBufferSize:0});j.Hasher=k.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a);this.reset()},reset:function(){k.reset.call(this);this._doReset()},update:function(a){this._append(a);this._process...
f)).finalize(b)}}});var s=p.algo={};return p}(Math);
(function(){var e=CryptoJS,m=e.lib,p=m.WordArray,j=m.Hasher,l=[],m=e.algo.SHA1=j.extend({_doReset:function(){this._hash=new p.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(f,n){for(var b=this._hash.words,h=b[...
k)-899497514);j=k;k=e;e=g<<30|g>>>2;g=h;h=c}b[0]=b[0]+h|0;b[1]=b[1]+g|0;b[2]=b[2]+e|0;b[3]=b[3]+k|0;b[4]=b[4]+j|0},_doFinalize:function(){var f=this._data,e=f.words,b=8*this._nDataBytes,h=8*f.sigBytes;e[h>>>5]|=128<<24-h%32;e[(h+64>>>9<<4)+14]=Math.f...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Advanced/Config/Date.pm view on Meta::CPAN
Here are some sample date strings in B<English> that this module can parse.
All for Christmas 2017. This is not a complete list of available date formats
supported. But should hopefully give you a starting point of what is possible.
Remember that if a date string contains extra info arround the date part of it,
that extra information is thrown away.
S<12/25/2017>, B<S<Mon Dec 25th 2017 at 09:00>>, S<Mon 2017/12/25>, B<S<2017-12-25>>,
S<Monday December 25th, 2017 at 09:00>, B<S<12.25.2017>>, S<25-DEC-2017>,
B<S<25-DECEMBER-2017>>, S<20171225>, B<S<12252017>>,
S<Mon dec. 25th 00:00:00 2017>, B<S<2017 12 25 mon>>.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Affix.xs view on Meta::CPAN
#endif
XSRETURN_EMPTY;
}
}
DCpointer ptr = dlFindSymbol(lib, symbol);
if (ptr == NULL) { // TODO: throw a warning
croak("Failed to locate symbol %s", symbol);
}
MAGIC *mg;
mg = sv_magicext(sv, NULL, PERL_MAGIC_ext, &pin_vtbl, NULL, 0);
{
lib/Affix.xs view on Meta::CPAN
}
call->fptr = dlFindSymbol(lib, symbol_);
size_t args_len = av_count(args);
if (call->fptr == NULL) { // TODO: throw a warning
safefree(call);
croak("Failed to locate symbol %s", symbol_);
}
call->lib = lib;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Agent/TCLI/Package/Tail.pm view on Meta::CPAN
=item Wally
This POE event handler doesn't do anything, because sometimes
we must have a state that doesn't respond to work requests.
For one never knows when we just throw some event out there if someone
else might pick it up by _default and do something with it.
This way we KNOW it won't get done.
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Query.pm view on Meta::CPAN
eval {query_row_ref "SELECT name FROM author"}; $@ # ~> A few lines!
=head2 query_scalar ($query, %params)
Returns the first value. The query must return one row, otherwise it throws an exception.
query_scalar "SELECT name FROM author WHERE id=2" # => Pushkin A.
=head2 make_query_for_order ($order, $next)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Type.pm view on Meta::CPAN
$Num->detail("x", "car") # => Error: x is'nt car!
=head2 validate ($element, $feature)
It tested C<$element> and throw C<detail> if element is exclude from class.
my $PositiveInt = Aion::Type->new(
name => "PositiveInt",
test => sub { /^\d+$/ },
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/AM.pm view on Meta::CPAN
my $train = $self->training_set;
# compute sub-lattices sizes here so that lattice space can be
# allocated in the _xs_initialize method. If certain features are
# thrown out later, each sub-lattice can only get smaller, so
# this is safe to do once here.
my $lattice_sizes = _compute_lattice_sizes($train->cardinality);
# sum is intitialized to a list of zeros
@{$self->{sum}} = (0.0) x ($train->num_classes + 1);
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
# Too far in the future, throw an error.
my $t = time;
if ( $s > $t ) { die <<"END_DIE" }
Your installer $0 has a modification time in the future ($s > $t).
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
# Too far in the future, throw an error.
my $t = time;
if ( $s > $t ) { die <<"END_DIE" }
Your installer $0 has a modification time in the future ($s > $t).
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/BitVector.pm view on Meta::CPAN
also supply the C<size> option as shown below:
$bv = Algorithm::BitVector->new( intVal => 5006, size => 16 ); # 0001001110001110
If the value supplied for the C<size> option in such a call is not larger than the
smallest bit array that represents the C<intVal> value, the constructor will throw an
exception.
=item B<Constructing a bitvector from a very large integer:>
use Math::BigInt;
lib/Algorithm/BitVector.pm view on Meta::CPAN
$bv = Algorithm::BitVector->new( textstring => "hello" );
print "$bv\n"; # 0110100001100101011011000110110001101111
print $bv->get_bitvector_in_ascrii(); # hello
The method returns a string of ASCII characters by converting successive 8-bit slices
of the bitvector into an ASCII character. It throws an exception if the size of the
bit pattern is not a multiple of 8. Calling this method to create a text-based print
representation of a bit vector makes sense only if you don't expect to see any
unprintable characters in the successive 8-bit slices of the bitvector. Let's say
you have created a bitvector from a text string using the appropriate constructor
call. Subsequently, you encrypted this text string. Next, you or someone else
lib/Algorithm/BitVector.pm view on Meta::CPAN
$bv = Algorithm::BitVector->new(bitstring => "0110100001100101011011000110110001101111");
print $bv->get_bitvector_in_hex(); # 68656c6c6f
The hex representation is returned in the form if a string of hex characters. This
method throws an exception if the size of the bitvector is not a multiple of 4.
=back
=head3 get_slice()
lib/Algorithm/BitVector.pm view on Meta::CPAN
$bv1 = Algorithm::BitVector->new( bitstring => '11111111' );
$bv2 = Algorithm::BitVector->new( bitstring => '00101011' );
print $bv1->hamming_distance( $bv2 ); # 4
This distance returns the number of bit positions in which two the bit patterns
differ. The method throws an exception if the two bitvectors are not of the same
length. The value returned is an integer.
=back
=head3 int_value()
lib/Algorithm/BitVector.pm view on Meta::CPAN
$bv = Algorithm::BitVector->new( bitstring => '01010101011100' );
print $bv->rank_of_bit_set_at_index( 10 ); # 6
The value 6 returned by this call to C<rank_of_bit_set_at_index()> is the number of
bits set up to the position indexed 10 (including that position). The method throws
an exception if there is no bit set at the argument position.
=back
=head3 read_bits_from_file()
lib/Algorithm/BitVector.pm view on Meta::CPAN
print $bv2; # 00111101
$bv3 = $bv2->unpermute( [3, 2, 1, 0, 7, 6, 5, 4] );
print $bv3; # 11001011
The method returns a new bitvector with unpermuted bits. Also note that the method
throws an exception if the permutation list is not as long as the size of the
bitvector on which the method is invoked.
=back
=head3 write_to_file()
lib/Algorithm/BitVector.pm view on Meta::CPAN
open my $FILEOUT, ">test.txt";
$bv1->write_to_file( $FILEOUT );
close $FILEOUT;
The size of a bitvector must be a multiple of 8 for this write method to work. If
this condition is not met, the method will throw an exception.
B<Important for Windows Users:> When writing an internally generated bitvector out
to a disk file, it may be important to open the file in the binary mode, since
otherwise the bit pattern `00001010' ('\n') in your bitstring will be written out as
0000110100001010 ('\r\n') which is the line break on Windows machines.
view all matches for this distribution
view release on metacpan or search on metacpan
t/011_infinite_loop.t view on Meta::CPAN
if(my $err = $@) {
if($err =~ /ALRMTimeout/) {
ok(0, "Loop terminated by SIGALRM");
}
elsif($err =~ /Infinite loop detected/) {
ok(1, "Graceful exception thrown");
}
else {
ok(0, "Unrecognized exception: $err");
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/CP/IZ/Int.pm view on Meta::CPAN
=item value
Returns instantiated value of this variable.
If this method called for not instancited variable, exception will be thrown.
=item is_free
Returns 1 (domain has more than 1 value) or 0 (domain has 1 only value).
view all matches for this distribution
view release on metacpan or search on metacpan
t/test.data view on Meta::CPAN
to TO O
Sandinista NNP B
rebels NNS I
trying VBG O
to TO O
overthrow VB O
the DT B
Nicaraguan JJ I
government NN I
of IN O
Mr. NNP B
view all matches for this distribution
view release on metacpan or search on metacpan
Combinatorics.pm view on Meta::CPAN
=back
=head2 Errors
The following errors may be thrown:
=over
=item Missing parameter data
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
# Too far in the future, throw an error.
my $t = time;
if ( $s > $t ) { die <<"END_DIE" }
Your installer $0 has a modification time in the future ($s > $t).
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-load.t view on Meta::CPAN
BEGIN {
use_ok( 'Algorithm::CriticalPath' ) || print "Bail out!\n";
# Test not supplying a graph
throws_ok ( sub { my $cp = Algorithm::CriticalPath->new() }, qr/Attribute \(graph\) is required/, 'Critical Path analysis requires a graph.');
# Test various simple dags give the expected critical path.
my $g = Graph->new(directed => 1);
t/00-load.t view on Meta::CPAN
$g2->add_weighted_vertex('Node1', 1);
$g2->add_weighted_vertex('Node2', 2);
$g2->add_edge('Node1','Node2');
$g2->add_edge('Node2','Node1');
throws_ok ( sub { $cp = Algorithm::CriticalPath->new( { graph => $g2}) }, qr/Invalid graph type for critical path analysis/, 'Critical Path analysis cannot be run on cyclic graphs.');
# Test building an invalid graph for critical path analysis - this one is not directed
my $g3 = Graph->new(undirected => 1);
throws_ok ( sub { my $cp = Algorithm::CriticalPath->new( { graph => $g3}) }, qr/Invalid graph type for critical path analysis/, 'Critical Path analysis cannot be run on undirected graphs.');
# Test building an invalid graph for critical path analysis - this one is refvertexed
my $g4 = Graph->new(refvertexed => 1);
throws_ok ( sub { my $cp = Algorithm::CriticalPath->new( { graph => $g4}) }, qr/Invalid graph type for critical path analysis/, 'Critical Path analysis cannot be run on refvertexed graphs.');
# Test building an invalid graph for critical path analysis - this one is multivertexed
my $g5 = Graph->new(multivertexed => 1);
throws_ok ( sub { my $cp = Algorithm::CriticalPath->new( { graph => $g5}) }, qr/Invalid graph type for critical path analysis/, 'Critical Path analysis cannot be run on multivertexed graphs.');
# Test building an invalid graph for critical path analysis - this one is multiedged
my $g6 = Graph->new(multiedged => 1);
throws_ok ( sub { my $cp = Algorithm::CriticalPath->new( { graph => $g6}) }, qr/Invalid graph type for critical path analysis/, 'Critical Path analysis cannot be run on multiedged graphs.');
}
diag( "Testing Algorithm::CriticalPath $Algorithm::CriticalPath::VERSION, Perl $], $^X" );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/CurveFit/Simple.pm view on Meta::CPAN
return $y;
}
=item C<fit(bounds_check =E<gt> 1)>
When set, the implementation will include logic for checking whether the input is out-of-bounds, per the highest and lowest x points in the data used to fit the formula. For implementation languages which support exceptions, an exception will be thr...
For instance, if the highest x in C<$xydata> is 83.0 and the lowest x is 60.0:
my($max_dev, $avg_dev, $src) = fit(xydata => \@xy, bounds_check => 1);
lib/Algorithm/CurveFit/Simple.pm view on Meta::CPAN
=item C<fit_parar>: Arrayref of formula parameters as returned by L<Algorithm::CurveFit>.
=item C<fit_time>: The number of seconds L<Algorithm::CurveFit> actually spent fitting the formula.
=item C<impl_exception>: The exception thrown when the implementation was used to calculate the deviations, or the empty string if none.
=item C<impl_formula>: The formula part of the implementation.
=item C<impl_source>: The implementation source string.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
# Too far in the future, throw an error.
my $t = time;
if ( $s > $t ) { die <<"END_DIE" }
Your installer $0 has a modification time in the future ($s > $t).
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
# Too far in the future, throw an error.
my $t = time;
if ( $s > $t ) { die <<"END_DIE" }
Your installer $0 has a modification time in the future ($s > $t).
view all matches for this distribution
view release on metacpan or search on metacpan
t/03-traversal.t view on Meta::CPAN
'Solver' => $solver,
);
my $expected = $test->{'output'};
if ($expected eq 'EXCEPTION') {
throws_ok {
$traversal->dryrun();
} qr/Not a valid graph!/, $test->{'message'};
note($solver->to_s);
next TEST;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Diff/Any.pm view on Meta::CPAN
my $diff = Algorithm::Diff::Any->new( \@seq1, \@seq2 );
# or with options
my $diff = Algorithm::Diff::Any->new( \@seq1, \@seq2, \%opts );
This method will return an appropriate B<Algorithm::Diff::Any> object or
throw an exception on error.
=cut
# Wrappers around the actual methods
sub new {
view all matches for this distribution