polyze/Polyze/Reporter.pm

37 lines
528 B
Perl

package Polyze::Reporter;
use Moose::Role;
has polyze => (
is => 'ro',
isa => 'Polyze',
required => 1,
handles => [qw( elide_domain )],
);
has line => (
is => 'ro',
isa => 'Polyze::Line',
required => 1,
handles => [qw( linenumber text )],
);
has count => (
is => 'ro',
isa => 'Int',
required => 0,
default => 1,
writer => '_set_count',
);
sub increment_count {
my ($self) = @_;
$self->_set_count($self->count + 1);
}
sub is_similar {
die("override missing");
}
no Moose;
1;