/usr/share/perl5/Dist/Zilla/Role/FileInjector.pm is in libdist-zilla-perl 6.010-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | package Dist::Zilla::Role::FileInjector 6.010;
# ABSTRACT: something that can add files to the distribution
use Moose::Role;
use namespace::autoclean;
#pod =head1 DESCRIPTION
#pod
#pod This role should be implemented by any plugin that plans to add files into the
#pod distribution. It provides one method (C<L</add_file>>, documented below),
#pod which adds a file to the distribution, noting the place of addition.
#pod
#pod =method add_file
#pod
#pod $plugin->add_file($dzil_file);
#pod
#pod This adds a file to the distribution, setting the file's C<added_by> attribute
#pod as it does so.
#pod
#pod =cut
sub add_file {
my ($self, $file) = @_;
my ($pkg, undef, $line) = caller;
$file->_set_added_by(
sprintf("%s (%s line %s)", $self->plugin_name, $pkg, $line),
);
$self->log_debug([ 'adding file %s', $file->name ]);
push @{ $self->zilla->files }, $file;
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Dist::Zilla::Role::FileInjector - something that can add files to the distribution
=head1 VERSION
version 6.010
=head1 DESCRIPTION
This role should be implemented by any plugin that plans to add files into the
distribution. It provides one method (C<L</add_file>>, documented below),
which adds a file to the distribution, noting the place of addition.
=head1 METHODS
=head2 add_file
$plugin->add_file($dzil_file);
This adds a file to the distribution, setting the file's C<added_by> attribute
as it does so.
=head1 AUTHOR
Ricardo SIGNES 😏 <rjbs@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
|