1package Test2::Compare::Event; 2use strict; 3use warnings; 4 5use Scalar::Util qw/blessed/; 6 7use Test2::Compare::EventMeta(); 8 9use base 'Test2::Compare::Object'; 10 11our $VERSION = '0.000162'; 12 13use Test2::Util::HashBase qw/etype/; 14 15sub name { 16 my $self = shift; 17 my $etype = $self->etype; 18 return "<EVENT: $etype>"; 19} 20 21sub meta_class { 'Test2::Compare::EventMeta' } 22sub object_base { 'Test2::Event' } 23 24sub got_lines { 25 my $self = shift; 26 my ($event) = @_; 27 return unless $event; 28 return unless blessed($event); 29 return unless $event->isa('Test2::Event'); 30 return unless $event->trace; 31 32 return ($event->trace->line); 33} 34 351; 36 37__END__ 38 39=pod 40 41=encoding UTF-8 42 43=head1 NAME 44 45Test2::Compare::Event - Event specific Object subclass. 46 47=head1 DESCRIPTION 48 49This module is used to represent an expected event in a deep comparison. 50 51=head1 SOURCE 52 53The source code repository for Test2-Suite can be found at 54F<https://github.com/Test-More/Test2-Suite/>. 55 56=head1 MAINTAINERS 57 58=over 4 59 60=item Chad Granum E<lt>exodist@cpan.orgE<gt> 61 62=back 63 64=head1 AUTHORS 65 66=over 4 67 68=item Chad Granum E<lt>exodist@cpan.orgE<gt> 69 70=back 71 72=head1 COPYRIGHT 73 74Copyright 2018 Chad Granum E<lt>exodist@cpan.orgE<gt>. 75 76This program is free software; you can redistribute it and/or 77modify it under the same terms as Perl itself. 78 79See F<http://dev.perl.org/licenses/> 80 81=cut 82