15759b3d2Safresh1package Test2::EventFacet::Meta;
25759b3d2Safresh1use strict;
35759b3d2Safresh1use warnings;
45759b3d2Safresh1
5*f2a19305Safresh1our $VERSION = '1.302194';
65759b3d2Safresh1
75759b3d2Safresh1BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) }
85759b3d2Safresh1use vars qw/$AUTOLOAD/;
95759b3d2Safresh1
105759b3d2Safresh1# replace set_details
115759b3d2Safresh1{
125759b3d2Safresh1    no warnings 'redefine';
135759b3d2Safresh1    sub set_details { $_[0]->{'set_details'} }
145759b3d2Safresh1}
155759b3d2Safresh1
165759b3d2Safresh1sub can {
175759b3d2Safresh1    my $self = shift;
185759b3d2Safresh1    my ($name) = @_;
195759b3d2Safresh1
205759b3d2Safresh1    my $existing = $self->SUPER::can($name);
215759b3d2Safresh1    return $existing if $existing;
225759b3d2Safresh1
235759b3d2Safresh1    # Only vivify when called on an instance, do not vivify for a class. There
245759b3d2Safresh1    # are a lot of magic class methods used in things like serialization (or
255759b3d2Safresh1    # the forks.pm module) which cause problems when vivified.
265759b3d2Safresh1    return undef unless ref($self);
275759b3d2Safresh1
285759b3d2Safresh1    my $sub = sub { $_[0]->{$name} };
295759b3d2Safresh1    {
305759b3d2Safresh1        no strict 'refs';
315759b3d2Safresh1        *$name = $sub;
325759b3d2Safresh1    }
335759b3d2Safresh1
345759b3d2Safresh1    return $sub;
355759b3d2Safresh1}
365759b3d2Safresh1
375759b3d2Safresh1sub AUTOLOAD {
385759b3d2Safresh1    my $name = $AUTOLOAD;
395759b3d2Safresh1    $name =~ s/^.*:://g;
405759b3d2Safresh1    my $sub = $_[0]->can($name);
415759b3d2Safresh1    goto &$sub;
425759b3d2Safresh1}
435759b3d2Safresh1
445759b3d2Safresh11;
455759b3d2Safresh1
465759b3d2Safresh1__END__
475759b3d2Safresh1
485759b3d2Safresh1=pod
495759b3d2Safresh1
505759b3d2Safresh1=encoding UTF-8
515759b3d2Safresh1
525759b3d2Safresh1=head1 NAME
535759b3d2Safresh1
545759b3d2Safresh1Test2::EventFacet::Meta - Facet for meta-data
555759b3d2Safresh1
565759b3d2Safresh1=head1 DESCRIPTION
575759b3d2Safresh1
585759b3d2Safresh1This facet can contain any random meta-data that has been attached to the
595759b3d2Safresh1event.
605759b3d2Safresh1
615759b3d2Safresh1=head1 METHODS AND FIELDS
625759b3d2Safresh1
635759b3d2Safresh1Any/all fields and accessors are autovivified into existence. There is no way
645759b3d2Safresh1to know what metadata may be added, so any is allowed.
655759b3d2Safresh1
665759b3d2Safresh1=over 4
675759b3d2Safresh1
685759b3d2Safresh1=item $anything = $meta->{anything}
695759b3d2Safresh1
705759b3d2Safresh1=item $anything = $meta->anything()
715759b3d2Safresh1
725759b3d2Safresh1=back
735759b3d2Safresh1
745759b3d2Safresh1=head1 SOURCE
755759b3d2Safresh1
765759b3d2Safresh1The source code repository for Test2 can be found at
775759b3d2Safresh1F<http://github.com/Test-More/test-more/>.
785759b3d2Safresh1
795759b3d2Safresh1=head1 MAINTAINERS
805759b3d2Safresh1
815759b3d2Safresh1=over 4
825759b3d2Safresh1
835759b3d2Safresh1=item Chad Granum E<lt>exodist@cpan.orgE<gt>
845759b3d2Safresh1
855759b3d2Safresh1=back
865759b3d2Safresh1
875759b3d2Safresh1=head1 AUTHORS
885759b3d2Safresh1
895759b3d2Safresh1=over 4
905759b3d2Safresh1
915759b3d2Safresh1=item Chad Granum E<lt>exodist@cpan.orgE<gt>
925759b3d2Safresh1
935759b3d2Safresh1=back
945759b3d2Safresh1
955759b3d2Safresh1=head1 COPYRIGHT
965759b3d2Safresh1
97256a93a4Safresh1Copyright 2020 Chad Granum E<lt>exodist@cpan.orgE<gt>.
985759b3d2Safresh1
995759b3d2Safresh1This program is free software; you can redistribute it and/or
1005759b3d2Safresh1modify it under the same terms as Perl itself.
1015759b3d2Safresh1
1025759b3d2Safresh1See F<http://dev.perl.org/licenses/>
1035759b3d2Safresh1
1045759b3d2Safresh1=cut
105