— |
=head1 NAME
Date::strict - enable/disable date strict mode.
=head1 SYNOPSIS
Date->new( "invalid date" );
Date->new( "invalid date" );
call_function_using_date();
no Date::strict;
Date->new( "invalid date" );
{
DateRel->new( "1X" );
$date + "1X" ;
}
DateRel->new( "1X" );
Date->new( "2019-01-32" );
Date::range_check(1);
Date->new( "2019-01-32" );
Date->new( "2019-01-32" );
=head1 DESCRIPTION
By default , when any error occurs in L<Date> framework, it returns an empty object with C<error()> set.
This module allows you to enable date / relative date string mode when instead of setting error, it throws an exception with the same error.
This mode only affects code inside the same lexical scope.
This mode automatically reverts when the scope ends. If you want to disable strict mode in the middle of the scope, use C< no Date::strict>. |