1Dist::Zilla::Role::FileUFsienrdeCroUnsterri(b3u)ted PerlDiDsotc:u:mZeinltlaat:i:oRnole::FileFinderUser(3)
2
3
4
6 Dist::Zilla::Role::FileFinderUser - something that uses FileFinder
7 plugins
8
10 version 4.300002
11
13 This role enables you to search for files in the dist. This makes it
14 easy to find specific files and have the code factored out to common
15 methods.
16
17 Here's an example of a finder: ( taken from AutoPrereqs )
18
19 with 'Dist::Zilla::Role::FileFinderUser' => {
20 default_finders => [ ':InstallModules', ':ExecFiles' ],
21 };
22
23 Then you use it in your code like this:
24
25 foreach my $file ( $self->found_files ) {
26 # $file is an object! Look at L<Dist::Zilla::Role::File>
27 }
28
30 finder_arg_names
31 Define the name of the attribute which will hold this finder. Be sure
32 to specify different names if you have multiple finders!
33
34 This is an ArrayRef.
35
36 Default: [ qw( finder ) ]
37
38 default_finders
39 This attribute is an arrayref of plugin names for the default plugins
40 the consuming plugin will use as finder.s
41
42 Example: "[ qw( :InstallModules :ExecFiles ) ]"
43
44 The default finders are:
45
46 :InstallModules
47 Searches your lib/ directory for pm/pod files
48
49 :IncModules
50 Searches your inc/ directory for pm files
51
52 :MainModule
53 Finds the "main_module" of your dist
54
55 :TestFiles
56 Searches your t/ directory and lists the files in it.
57
58 :ExecFiles
59 Searches your distribution for executable files. Hint: Use the
60 Dist::Zilla::Plugin::ExecDir plugin to mark those files as
61 executables.
62
63 :ShareFiles
64 Searches your ShareDir directory and lists the files in it. Hint:
65 Use the Dist::Zilla::Plugin::ShareDir plugin to setup the sharedir.
66
67 method
68 This will be the name of the subroutine installed in your package for
69 this finder. Be sure to specify different names if you have multiple
70 finders!
71
72 Default: found_files
73
75 Ricardo SIGNES <rjbs@cpan.org>
76
78 This software is copyright (c) 2011 by Ricardo SIGNES.
79
80 This is free software; you can redistribute it and/or modify it under
81 the same terms as the Perl 5 programming language system itself.
82
83
84
85perl v5.12.4 2011-09-2D2ist::Zilla::Role::FileFinderUser(3)