DisjConditions.pm (automake-1.16.2.tar.xz) | : | DisjConditions.pm (automake-1.16.3.tar.xz) | ||
---|---|---|---|---|
skipping to change at line 20 | skipping to change at line 20 | |||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
# GNU General Public License for more details. | # GNU General Public License for more details. | |||
# You should have received a copy of the GNU General Public License | # You should have received a copy of the GNU General Public License | |||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | # along with this program. If not, see <https://www.gnu.org/licenses/>. | |||
package Automake::DisjConditions; | package Automake::DisjConditions; | |||
use 5.006; | use 5.006; | |||
use strict; | use strict; | |||
use warnings FATAL => 'all'; | ||||
use Carp; | use Carp; | |||
use Automake::Condition qw/TRUE FALSE/; | use Automake::Condition qw (TRUE FALSE); | |||
=head1 NAME | =head1 NAME | |||
Automake::DisjConditions - record a disjunction of Conditions | Automake::DisjConditions - record a disjunction of Conditions | |||
=head1 SYNOPSIS | =head1 SYNOPSIS | |||
use Automake::Condition; | use Automake::Condition; | |||
use Automake::DisjConditions; | use Automake::DisjConditions; | |||
skipping to change at line 142 | skipping to change at line 144 | |||
As explained previously, the reference (object) returned is unique | As explained previously, the reference (object) returned is unique | |||
with respect to C<@conds>. For this purpose, duplicate elements are | with respect to C<@conds>. For this purpose, duplicate elements are | |||
ignored. | ignored. | |||
=cut | =cut | |||
# Keys in this hash are DisjConditions strings. Values are the | # Keys in this hash are DisjConditions strings. Values are the | |||
# associated object DisjConditions. This is used by 'new' to reuse | # associated object DisjConditions. This is used by 'new' to reuse | |||
# DisjConditions objects with identical conditions. | # DisjConditions objects with identical conditions. | |||
use vars '%_disjcondition_singletons'; | our %_disjcondition_singletons; | |||
sub new ($;@) | sub new ($;@) | |||
{ | { | |||
my ($class, @conds) = @_; | my ($class, @conds) = @_; | |||
my @filtered_conds = (); | my @filtered_conds = (); | |||
for my $cond (@conds) | for my $cond (@conds) | |||
{ | { | |||
confess "'$cond' isn't a reference" unless ref $cond; | confess "'$cond' isn't a reference" unless ref $cond; | |||
confess "'$cond' isn't an Automake::Condition" | confess "'$cond' isn't an Automake::Condition" | |||
unless $cond->isa ("Automake::Condition"); | unless $cond->isa ("Automake::Condition"); | |||
End of changes. 3 change blocks. | ||||
2 lines changed or deleted | 4 lines changed or added |