]>
Raphaƫl G. Git Repositories - carabistouilles/blob - lib/siren.pm
26 # Link self to package
35 my ($self, $file) = @_;
38 open(my $fh, '<', $file) or die $!;
47 carp
$_.' do not seems to be a valid siren'."\n";
52 if (! defined($self->{sirens
}{$_})) {
54 $self->{sirens
}{$_} = 1;
59 # Grow siren occurence number
60 $self->{sirens
}{$_}++;
61 # Move siren from unique to duplicate category
62 if ($self->{sirens
}{$_} eq 2) {
82 return 'Unique'.($self->{unique
} gt 1?'s':'').': '.$self->{unique
}.', duplicate'.($self->{duplicate
} gt 1?'s':'').': '.$self->{duplicate
}."\n";