File-ShareDir-ProjectDistDir-0.5.2/0000755000175000017500000000000012220640677015455 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/LICENSE0000644000175000017500000004374112220640677016473 0ustar kentkentThis software is copyright (c) 2013 by Kent Fredric . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2013 by Kent Fredric . This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2013 by Kent Fredric . This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End File-ShareDir-ProjectDistDir-0.5.2/Changes0000644000175000017500000001524112220640677016753 0ustar kentkentRelease history for File-ShareDir-ProjectDistDir 0.5.2 2013-09-25T20:04:10Z [Bugfix] - Use a Test::Compile not known to break on Win32 [Dependencies::Added / test requires] - File::Spec 0.5.1 2013-09-16T07:34:01Z [!Minor] - No serious changes, just 0.5.0 without -TRIAL - and a few test changes and relevant dep changes. [Dependencies::Added / develop requires] - Test::Kwalitee 1.08 [Dependencies::Added / test requires] - IO::Handle - IPC::Open3 [Dependencies::Changed / build requires] - Module::Build 0.4005 → 0.4007 [Dependencies::Changed / configure requires] - Module::Build 0.4005 → 0.4007 [Dependencies::Changed / develop suggests] - Dist::Zilla::PluginBundle::Author::KENTNL v1.7.4 → v1.8.3 [Dependencies::Removed / test requires] - File::Find - File::Temp 0.5.0 2013-07-06T18:11:52Z [00 MAJOR CHANGES] - Entire Heuristics system replaced with Path::IsDev/Path::FindDev - Internals re-written to use Path::Tiny - Please read SIGNIFICANT CHANGES section on ::ProjectDistDir for details [Dependencies::Added / runtime requires] - Path::Class::Dir - Path::FindDev - Path::IsDev - Path::Tiny [Dependencies::Added / test requires] - lib [Dependencies::Changed / develop suggests] - Dist::Zilla::PluginBundle::Author::KENTNL v1.7.3 → v1.7.4 0.4.4 2013-06-05T17:11:18Z [00 Noteable Changes] - Edge Case logic that was added in 0.4.2 removed. - Test for edgecase that was added in 0.4.3 removed. [Documentation] - Basic MetaPOD information added. 0.4.3 2013-05-23T18:29:12Z [00 Noteable Changes] - added basic debugging of the dev/prod determination logic, controlled by FILE_SHAREDIR_PROJECTDISTDIR_DEBUG=1 [Tests] - added test case for Imagemagick 0.4.2 2013-05-23T17:11:31Z [Bug Fixes] - workaround for a user-installation that created a 'share' dir as a sibling of a 'lib' dir, which falsely lead us to believe the 'lib' dir was a "development lib dir", caused by a user installing ImageMagic wrongly. - This is only really a temporary solution, in lieu of better debugging diagnostics. [Dependencies::Added / develop requires] - Test::CPAN::Changes 0.19 [Dependencies::Changed / build requires] - Module::Build 0.4003 → 0.4005 [Dependencies::Changed / configure requires] - Module::Build 0.4003 → 0.4005 [Dependencies::Changed / develop suggests] - Dist::Zilla::PluginBundle::Author::KENTNL v1.7.0 → v1.7.3 [Packaging] - use MB 0.4004 test_requires 0.4.1 2013-02-13T23:17:46Z - No significant changes from 0.4.0, but non-trial [Dependencies::Added / develop requires] - Pod::Coverage::TrustPod - Test::CPAN::Meta - Test::Pod 1.41 - Test::Pod::Coverage 1.08 - version 0.9901 [Dependencies::Changed / build requires] - Module::Build 0.4002 → 0.4003 [Dependencies::Changed / configure requires] - Module::Build 0.4002 → 0.4003 [Dependencies::Changed / develop suggests] - Dist::Zilla::PluginBundle::Author::KENTNL v1.4.2 → v1.7.0 [Documentation] - update copyright year [Meta] - bugtracker moved to github issues 0.4.0 2012-07-28T21:54:15Z [Dependencies::Changed / build requires] - Module::Build 0.3601 → 0.4002 [Dependencies::Changed / configure requires] - Module::Build 0.3601 → 0.4002 [Dependencies::Changed / develop suggests] - Dist::Zilla::PluginBundle::Author::KENTNL v1.3.0 → v1.4.2 [Dependencies::Changed / test requires] - Test::More 0.96 → 0.98 [Features] - now can specify 'pathclass => 1' in various places and get Path::Class objects. 0.3.2 2012-05-07T17:07:54Z [Bugs] - github#2 There was a bug on some platforms where Path::Class::Dir->new('/')->parent->dir_list() returned a 2-item list instead of a one-item list which was our loop termination criteria. This became an infinite death loop on all platforms that have a "volume" ( mac, win ). Has been resolved by performing a check to see if the path is the OS Specific path that represents a "root" from File::Spec->rootdir. Feedback on if this works or not requested, and if this still is a problem, I'll use $dir->parent eq $dir being the loop terminator. [Dependencies::Changed / develop recommends] - Dist::Zilla::PluginBundle::Author::KENTNL::Lite 0.01009803 → v1.3.0 [Dependencies::Changed / develop suggests] - Dist::Zilla::PluginBundle::Author::KENTNL v1.2.0 → v1.3.0 0.3.1 2012-03-07T03:57:06Z [00 Summary] - Dropping 5.10.0 dependency back to 5.006 due to github#1. Apparently there is a sustainable way to use decimal versions in <=5.10.0 reliably via 'use version', so this is somewhat experimental consideration of that fact. [Dependencies::Changed / runtime requires] - perl v5.10.0 → 5.006 0.3.0 2012-03-05T05:27:43Z [00 Noteworthy Changes] - New 'distname' parameter - greatly enhanced documentation - supports 'projectdir' on a per-export level. [Dependencies::Added / runtime requires] - perl v5.10.0 [Dependencies::Changed / develop suggests] - Dist::Zilla::PluginBundle::Author::KENTNL v1.0.0 → v1.2.0 [Documentation] - verbosely detailed the workings of the import method and its helper methods. [Features] - new experimental support for a 'distname' parameter. - per export support for 'projectdir' allowing >1 dist_dir method to be exported. [Packaging] - Update LICENSE ( Year, Indentation ) [Tests::New] - release/minimum-version.t - t/06_distname.t 0.2.0 2011-10-15T02:08:29Z [Dependencies::Added / runtime requires] - strict - warnings [Dependencies::Removed / test requires] - English [Features] - Custom Project Dir: - Can now support passing a directory other than 'share' to use in your project. - eg: use File::ShareDir::ProjectDistDir qw( :all ), projectdir => 'templates'; - Thank Getty/Torsten Raudssus for requesting this feature. [Internals] - $VERSION is no longer set during BEGIN ( Dist::Zilla ) [Packaging] - Re-generated License from more recent template ( minor indentation changes, change of address ) - AuthorTests/ReleaseTests no longer stored in t/, no longer do ENV{} based mangling, no longer spams you during install, and are now only even notable during `dzil release` and `dzil xtest`. ( See Dist::Zilla::Plugin::CheckExtraTests> for details. - All github URL's now point to https:// paths. - Now uses Authority plugin to create $AUTHORITY headings and x_authority = cpan:KENTNL [Tests] - New test that tests new syntax for using a custom sharedir name. 0.1.1 2011-04-08T01:29:46Z - No major changes, this is just a non-trial release, as at least one other person has now tested it and said it works. 0.1.0 2011-04-08T00:51:39Z - First version. - Early development release. - Thank Getty/Torsen Raudssus for requesting this modules development. File-ShareDir-ProjectDistDir-0.5.2/lib/0000755000175000017500000000000012220640677016223 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/lib/File/0000755000175000017500000000000012220640677017102 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/lib/File/ShareDir/0000755000175000017500000000000012220640677020603 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/lib/File/ShareDir/ProjectDistDir.pm0000644000175000017500000004073512220640677024043 0ustar kentkentuse strict; use warnings; package File::ShareDir::ProjectDistDir; BEGIN { $File::ShareDir::ProjectDistDir::AUTHORITY = 'cpan:KENTNL'; } { $File::ShareDir::ProjectDistDir::VERSION = '0.5.2'; } # ABSTRACT: Simple set-and-forget using of a '/share' directory in your projects root use Path::Class::File; use Path::IsDev qw(); use Path::FindDev qw(find_dev); use Sub::Exporter qw(build_exporter); use File::ShareDir qw(); my ($exporter) = build_exporter( { exports => [ dist_dir => \&build_dist_dir, dist_file => \&build_dist_file ], groups => { all => [qw( dist_dir dist_file )], 'default' => [qw( dist_dir dist_file )] }, collectors => [ 'defaults', ], } ); my $env_key = 'FILE_SHAREDIR_PROJECTDISTDIR_DEBUG'; if ( $ENV{$env_key} ) { ## no critic (ProtectPrivateVars) *File::ShareDir::ProjectDistDir::_debug = sub ($) { *STDERR->printf( qq{[ProjectDistDir] %s\n}, $_[0] ); }; $Path::IsDev::DEBUG = 1; $Path::FindDev::DEBUG = 1; } else { ## no critic (ProtectPrivateVars) *File::ShareDir::ProjectDistDir::_debug = sub ($) { } } ## no critic (RequireArgUnpacking) sub _croak { require Carp; goto &Carp::croak } sub _path { require Path::Tiny; goto &Path::Tiny::path } sub _pathclassfile { require Path::Class::File; return Path::Class::File->new(@_) } sub _pathclassdir { require Path::Class::Dir; return Path::Class::Dir->new(@_) } sub import { my ( $class, @args ) = @_; my $has_defaults = undef; my ( $xclass, $xfilename, $xline ) = caller; my $defaults = { filename => $xfilename, projectdir => 'share', pathclass => undef, }; if ( not @args ) { @_ = ( $class, ':all', defaults => $defaults ); goto $exporter; } for ( 0 .. $#args - 1 ) { my ( $key, $value ); next unless $key = $args[$_] and $value = $args[ $_ + 1 ]; if ( $key eq 'defaults' ) { $defaults = $value; undef $args[$_]; undef $args[ $_ + 1 ]; next; } for my $setting (qw( projectdir filename distname pathclass pathtiny )) { if ( $key eq $setting and not ref $value ) { $defaults->{$setting} = $value; undef $args[$_]; undef $args[ $_ + 1 ]; last; } } } $defaults->{filename} = $xfilename if not defined $defaults->{filename}; $defaults->{projectdir} = 'share' if not defined $defaults->{projectdir}; @_ = ( $class, ( grep { defined } @args ), 'defaults' => $defaults ); goto $exporter; } sub _devel_sharedir { my ( $filename, $subdir ) = @_; _debug( 'Working on: ' . $filename ); my $dev = find_dev( _path($filename)->parent ); return if not defined $dev; my $devel_share_dir = $dev->child($subdir); if ( -d $devel_share_dir ) { _debug( 'ISDEV : exists : /' . $subdir . ' > ' . $devel_share_dir ); return $devel_share_dir; } _debug( 'ISPROD: does not exist : /' . $subdir . ' > ' . $devel_share_dir ); #warn "Not a devel $dir"; return; } sub _get_defaults { my ( $field, $arg, $col ) = @_; my $result; $result = $col->{defaults}->{$field} if $col->{defaults}->{$field}; $result = $arg->{$field} if $arg->{$field}; return $result; } sub _wrap_return { my ( $type, $value ) = @_; if ( not $type ) { return $value unless ref $value; return "$value"; } if ( $type eq 'pathtiny' ) { return $value if ref $value eq 'Path::Tiny'; return Path::Tiny::path($value); } if ( $type eq 'pathclassdir' ) { return $value if ref $value eq 'Path::Class::Dir'; require Path::Class::Dir; return Path::Class::Dir->new("$value"); } if ( $type eq 'pathclassfile' ) { return $value if ref $value eq 'Path::Class::File'; require Path::Class::File; return Path::Class::File->new("$value"); } return _croak("Unknown return type $type"); } sub build_dist_dir { my ( $class, $name, $arg, $col ) = @_; my $projectdir = _get_defaults( projectdir => $arg, $col ); my $pathclass = _get_defaults( pathclass => $arg, $col ); my $pathtiny = _get_defaults( pathtiny => $arg, $col ); my $wrap_return_type; if ($pathclass) { $wrap_return_type = 'pathclassdir' } if ($pathtiny) { $wrap_return_type = 'pathtiny' } my $root = _devel_sharedir( $col->{defaults}->{filename}, $projectdir ); my $distname = _get_defaults( distname => $arg, $col ); # In dev if ($root) { return sub { return _wrap_return( $wrap_return_type, $root ) }; } # Non-Dev, no hardcoded distname if ( not $distname ) { my $string_method = \&File::ShareDir::dist_dir; return sub { return _wrap_return( $wrap_return_type, $string_method->(@_) ) }; } # Non-Dev, hardcoded distname my $string_method = sub() { @_ = ($distname); goto &File::ShareDir::dist_dir; }; return sub { return _wrap_return( $wrap_return_type, $string_method->(@_) ) }; } sub build_dist_file { my ( $class, $name, $arg, $col ) = @_; my $projectdir = _get_defaults( projectdir => $arg, $col ); my $pathclass = _get_defaults( pathclass => $arg, $col ); my $pathtiny = _get_defaults( pathtiny => $arg, $col ); my $root = _devel_sharedir( $col->{defaults}->{filename}, $projectdir ); my $distname = _get_defaults( distname => $arg, $col ); my $wrap_return_type; if ($pathclass) { $wrap_return_type = 'pathclassfile' } if ($pathtiny) { $wrap_return_type = 'pathtiny' } if ($root) { my $pathclass_method = sub { my $file = ( $distname ? $_[0] : $_[1] ); # if the caller is devel, then we return the project root, # regardless of what package you asked for. # Might be bad, but we haven't imagined the scenario where yet. my $path_o = $root->child($file)->absolute; my $path_s = $path_o->stringify; ## no critic ( ProhibitExplicitReturnUndef ) return undef unless -e $path_s; if ( not -f $path_s ) { return _croak("Found dist_file '$path_s', but not a file"); } if ( not -r $path_s ) { return _croak("File '$path_s', no read permissions"); } return $path_o; }; return sub { return _wrap_return( $wrap_return_type, $pathclass_method->(@_) ); }; } if ( not $distname ) { my $string_method = \&File::ShareDir::dist_file; return sub { return _wrap_return( $wrap_return_type, $string_method->(@_) ) }; } my $string_method = sub($) { if ( @_ != 1 or not defined $_[0] ) { return _croak('dist_file takes only one argument,a filename, due to distname being specified during import'); } unshift @_, $distname; goto &File::ShareDir::dist_file; }; return sub { return _wrap_return( $wrap_return_type, $string_method->(@_) ); }; } 1; __END__ =pod =head1 NAME File::ShareDir::ProjectDistDir - Simple set-and-forget using of a '/share' directory in your projects root =head1 VERSION version 0.5.2 =head1 SYNOPSIS package An::Example::Package; use File::ShareDir::ProjectDistDir; # during development, $dir will be $projectroot/share # but once installed, it will be wherever File::Sharedir thinks it is. my $dir = dist_dir('An-Example') Project layout requirements: $project/ $project/lib/An/Example/Package.pm $project/share/ # files for package 'An-Example' go here. You can use a directory name other than 'share' ( Assuming you make sure when you install that, you specify the different directory there also ) as follows: use File::ShareDir::ProjectDistDir ':all', defaults => { projectdir => 'templates', }; =head1 METHODS =head2 import use File::ShareDir::ProjectDistDir (@args); This uses L<< C|Sub::Exporter >> to do the heavy lifting, so most usage of this module can be maximised by understanding that first. =over 4 =item * B> ->import( ':all' , .... ) Import both C and C =item * B> ->import('dist_dir' , .... ) Import the dist_dir method =item * B> ->import('dist_file' , .... ) Import the dist_file method =item * B> ->import( .... , projectdir => 'share' ) Specify what the project directory is as a path relative to the base of your distributions source, and this directory will be used as a C simulation path for the exported methods I. If not specified, the default value 'share' is used. =item * B> ->import( .... , filename => 'some/path/to/foo.pm' ); Generally you don't want to set this, as its worked out by caller() to work out the name of the file its being called from. This file's path is walked up to find the 'lib' element with a sibling of the name of your C. =item * B> ->import( .... , distname => 'somedistname' ); Specifying this argument changes the way the functions are emitted at I>, so that instead of taking the standard arguments File::ShareDir does, the specification of the C in those functions is eliminated. i.e: # without this flag use File::ShareDir::ProjectDistDir qw( :all ); my $dir = dist_dir('example'); my $file = dist_file('example', 'path/to/file.pm' ); # with this flag use File::ShareDir::ProjectDistDir ( qw( :all ), distname => 'example' ); my $dir = dist_dir(); my $file = dist_file('path/to/file.pm' ); =item * B> ->import( ... , defaults => { filename => ...., projectdir => ...., }); This is mostly an alternative syntax for specifying C and C, which is mostly used internally, and their corresponding other values are packed into this one. =back =head3 Sub::Exporter tricks of note. =head4 Make your own sharedir util package Foo::Util; sub import { my ($caller_class, $caller_file, $caller_line ) = caller(); if ( grep { /share/ } @_ ) { require File::ShareDir::ProjectDistDir; File::ShareDir::ProjectDistDir->import( filename => $caller_file, dist_dir => { distname => 'myproject' , -as => 'share' }, dist_dir => { distname => 'otherproject' , -as => 'other_share' , projectdir => 'share2' }, -into => $caller_class, ); } } .... package Foo; use Foo::Util qw( share ); my $dir = share(); my $other_dir => other_share(); =head2 build_dist_dir use File::ShareDir::ProjectDirDir ( : all ); # this calls my $coderef = File::ShareDir::ProjectDistDir->build_dist_dir( 'dist_dir' => {}, { defaults => { filename => 'path/to/yourcallingfile.pm', projectdir => 'share' } } ); use File::ShareDir::ProjectDirDir ( qw( :all ), distname => 'example-dist' ); # this calls my $coderef = File::ShareDir::ProjectDistDir->build_dist_dir( 'dist_dir' => {}, { distname => 'example-dist', defaults => { filename => 'path/to/yourcallingfile.pm', projectdir => 'share' } } ); use File::ShareDir::ProjectDirDir dist_dir => { distname => 'example-dist', -as => 'mydistdir' }, dist_dir => { distname => 'other-dist', -as => 'otherdistdir' }; # This calls my $coderef = File::ShareDir::ProjectDistDir->build_dist_dir( 'dist_dir', { distname => 'example-dist' }, { defaults => { filename => 'path/to/yourcallingfile.pm', projectdir => 'share' } }, ); my $othercoderef = File::ShareDir::ProjectDistDir->build_dist_dir( 'dist_dir', { distname => 'other-dist' }, { defaults => { filename => 'path/to/yourcallingfile.pm', projectdir => 'share' } }, ); # And leverages Sub::Exporter to create 2 subs in your package. Generates the exported 'dist_dir' method. In development environments, the generated method will return a path to the development directories 'share' directory. In non-development environments, this simply returns C. As a result of this, specifying the Distribution name is not required during development, however, it will start to matter once it is installed. This is a potential avenues for bugs if you happen to name it wrong. =head2 build_dist_file use File::ShareDir::ProjectDirDir ( : all ); # this calls my $coderef = File::ShareDir::ProjectDistDir->build_dist_file( 'dist_file' => {}, { defaults => { filename => 'path/to/yourcallingfile.pm', projectdir => 'share' } } ); use File::ShareDir::ProjectDirDir ( qw( :all ), distname => 'example-dist' ); # this calls my $coderef = File::ShareDir::ProjectDistDir->build_dist_file( 'dist_file' => {}, { distname => 'example-dist', defaults => { filename => 'path/to/yourcallingfile.pm', projectdir => 'share' } } ); use File::ShareDir::ProjectDirDir dist_file => { distname => 'example-dist', -as => 'mydistfile' }, dist_file => { distname => 'other-dist', -as => 'otherdistfile' }; # This calls my $coderef = File::ShareDir::ProjectDistDir->build_dist_file( 'dist_file', { distname => 'example-dist' }, { defaults => { filename => 'path/to/yourcallingfile.pm', projectdir => 'share' } }, ); my $othercoderef = File::ShareDir::ProjectDistDir->build_dist_file( 'dist_file', { distname => 'other-dist' }, { defaults => { filename => 'path/to/yourcallingfile.pm', projectdir => 'share' } }, ); # And leverages Sub::Exporter to create 2 subs in your package. Generates the 'dist_file' method. In development environments, the generated method will return a path to the development directories 'share' directory. In non-development environments, this simply returns C. Caveats as a result of package-name as stated in L also apply to this method. =begin MetaPOD::JSON v1.0.0 { "namespace":"File::ShareDir::ProjectDistDir" } =end MetaPOD::JSON =head1 SIGNIFICANT CHANGES =head2 0.5.0 - Heuristics and Return type changes =head3 New C heuristic Starting with 0.5.0, instead of using our simple C pattern heuristic, a more advanced heuristic is used from the new L<< C|Path::FindDev >> and L<< C|Path::IsDev >>. This relies on a more "concrete" marker somewhere at the top of your development tree, and more importantly, checks for the existence of specific files that are not likely to occur outside a project root. C and C based heuristics were a little fragile, for a few reasons: =over 4 =item * C can, and does appear all over UNIX file systems, for purposes B than development project roots. For instance, have a look in C /usr/bin /usr/lib /usr/share ## UHOH. This would have the very bad side effect of anything installed in C thinking its "in development". Fortunately, nobody seems to have hit this specific bug, which I suspect is due only to C being a symbolic link on most x86_64 systems. =item * C is also reasonably common within C package names. For instance: lib::abs Which means you'll have a hierarchy like: $PREFIX/lib/lib/abs All you need for something to go horribly wrong would be for somebody to install a C module named: share::mystuff Or similar, and instantly, you have: $PREFIX/lib/lib/ $PREFIX/lib/share/ Which would mean any module calling itself C would be unable to use this module. =back So instead, as of C<0.5.0>, the heuristic revolves around certain specific files being in the C directory. Which is hopefully a more fault resilient mechanism. =head3 New Return Types Starting with 0.5.0, the internals are now based on L<< C|Path::Tiny >> instead of L<< C|Path::Class >>, and as a result, there may be a few glitches in transition. Also, previously you could get a C object back from C and C by importing it as such: use File::ShareDir::ProjectDistDir qw( dist_dir dist_file ), defaults => { pathclass => 1 }; Now you can also get C objects back, by passing: use File::ShareDir::ProjectDistDir qw( dist_dir dist_file ), defaults => { pathtiny => 1 }; For the time being, you can still get Path::Class objects back, but its likely to be deprecated in future. ( In fact, I may even make 2 specific sub-classes of C for people who want objects back, as it will make the C and the code much cleaner ) =head1 AUTHOR Kent Fredric =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2013 by Kent Fredric . 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 File-ShareDir-ProjectDistDir-0.5.2/xt/0000755000175000017500000000000012220640677016110 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/xt/release/0000755000175000017500000000000012220640677017530 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/xt/release/pod-coverage.t0000644000175000017500000000052712220640677022274 0ustar kentkent#!perl use Test::More; eval "use Test::Pod::Coverage 1.08"; plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage" if $@; eval "use Pod::Coverage::TrustPod"; plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage" if $@; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); File-ShareDir-ProjectDistDir-0.5.2/xt/release/cpan-changes.t0000644000175000017500000000026312220640677022245 0ustar kentkent#!perl use strict; use warnings; use Test::More 0.96 tests => 2; use_ok('Test::CPAN::Changes'); subtest 'changes_ok' => sub { changes_file_ok('Changes'); }; done_testing(); File-ShareDir-ProjectDistDir-0.5.2/xt/release/pod-syntax.t0000644000175000017500000000021212220640677022016 0ustar kentkent#!perl use Test::More; eval "use Test::Pod 1.41"; plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; all_pod_files_ok(); File-ShareDir-ProjectDistDir-0.5.2/xt/release/distmeta.t0000644000175000017500000000021712220640677021527 0ustar kentkent#!perl use Test::More; eval "use Test::CPAN::Meta"; plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@; meta_yaml_ok(); File-ShareDir-ProjectDistDir-0.5.2/xt/release/minimum-version.t0000644000175000017500000000027012220640677023052 0ustar kentkent#!perl use Test::More; eval "use Test::MinimumVersion"; plan skip_all => "Test::MinimumVersion required for testing minimum versions" if $@; all_minimum_version_from_metayml_ok(); File-ShareDir-ProjectDistDir-0.5.2/xt/release/kwalitee.t0000644000175000017500000000015612220640677021524 0ustar kentkent# This test is generated by Dist::Zilla::Plugin::Test::Kwalitee use strict; use warnings; use Test::Kwalitee; File-ShareDir-ProjectDistDir-0.5.2/xt/release/eol.t0000644000175000017500000000024012220640677020470 0ustar kentkentuse strict; use warnings; use Test::More; eval 'use Test::EOL'; plan skip_all => 'Test::EOL required' if $@; all_perl_files_ok({ trailing_whitespace => 1 }); File-ShareDir-ProjectDistDir-0.5.2/xt/author/0000755000175000017500000000000012220640677017412 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/xt/author/critic.t0000644000175000017500000000043512220640677021056 0ustar kentkent#!perl use strict; use warnings; use Test::More; use English qw(-no_match_vars); eval "use Test::Perl::Critic"; plan skip_all => 'Test::Perl::Critic required to criticise code' if $@; Test::Perl::Critic->import( -profile => "perlcritic.rc" ) if -e "perlcritic.rc"; all_critic_ok(); File-ShareDir-ProjectDistDir-0.5.2/Build.PL0000644000175000017500000000270212220640677016752 0ustar kentkent use strict; use warnings; use Module::Build 0.3601; my %module_build_args = ( "build_requires" => { "Module::Build" => "0.4007" }, "configure_requires" => { "Module::Build" => "0.4007" }, "dist_abstract" => "Simple set-and-forget using of a '/share' directory in your projects root", "dist_author" => [ "Kent Fredric " ], "dist_name" => "File-ShareDir-ProjectDistDir", "dist_version" => "0.5.2", "license" => "perl", "module_name" => "File::ShareDir::ProjectDistDir", "recommends" => {}, "recursive_test_files" => 1, "requires" => { "Carp" => 0, "File::ShareDir" => 0, "Path::Class::Dir" => 0, "Path::Class::File" => 0, "Path::FindDev" => 0, "Path::IsDev" => 0, "Path::Tiny" => 0, "Sub::Exporter" => 0, "perl" => "5.006", "strict" => 0, "warnings" => 0 }, "script_files" => [], "test_requires" => { "File::Spec" => 0, "FindBin" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "Test::More" => "0.98", "lib" => 0 } ); unless ( eval { Module::Build->VERSION(0.4004) } ) { my $tr = delete $module_build_args{test_requires}; my $br = $module_build_args{build_requires}; for my $mod ( keys %$tr ) { if ( exists $br->{$mod} ) { $br->{$mod} = $tr->{$mod} if $tr->{$mod} > $br->{$mod}; } else { $br->{$mod} = $tr->{$mod}; } } } my $build = Module::Build->new(%module_build_args); $build->create_build_script; File-ShareDir-ProjectDistDir-0.5.2/t/0000755000175000017500000000000012220640677015720 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/01_devel.t0000644000175000017500000000032312220640677017502 0ustar kentkent use strict; use warnings; use Test::More 0.96; use FindBin; use lib "$FindBin::Bin/01_files/lib"; use Example_01; is( Example_01->test(), '01', 'Example 01 returns the right shared value' ); done_testing; File-ShareDir-ProjectDistDir-0.5.2/t/04_files/0000755000175000017500000000000012220640677017325 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/04_files/develdir/0000755000175000017500000000000012220640677021123 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/04_files/develdir/lib/0000755000175000017500000000000012220640677021671 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/04_files/develdir/lib/Example_06.pm0000644000175000017500000000032312220640677024125 0ustar kentkentuse strict; use warnings; package Example_06; use File::ShareDir::ProjectDistDir; use Path::Class::File; sub test { return scalar Path::Class::File->new( dist_file( 'Example_0', 'file' ) )->slurp(); } 1; File-ShareDir-ProjectDistDir-0.5.2/t/04_files/develdir/.devdir0000644000175000017500000000000012220640677022367 0ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/04_files/develdir/share/0000755000175000017500000000000012220640677022225 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/04_files/develdir/share/file0000644000175000017500000000000212220640677023057 0ustar kentkent06File-ShareDir-ProjectDistDir-0.5.2/t/04_files/installdir/0000755000175000017500000000000012220640677021472 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/04_files/installdir/lib/0000755000175000017500000000000012220640677022240 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/04_files/installdir/lib/Example_06.pm0000644000175000017500000000032412220640677024475 0ustar kentkentuse strict; use warnings; package Example_06; use File::ShareDir::ProjectDistDir; use Path::Class::File; sub test { return scalar Path::Class::File->new( dist_file( 'Example_06', 'file' ) )->slurp(); } 1; File-ShareDir-ProjectDistDir-0.5.2/t/04_files/installdir/lib/auto/0000755000175000017500000000000012220640677023210 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/04_files/installdir/lib/auto/share/0000755000175000017500000000000012220640677024312 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/04_files/installdir/lib/auto/share/dist/0000755000175000017500000000000012220640677025255 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/04_files/installdir/lib/auto/share/dist/Example_06/0000755000175000017500000000000012220640677027155 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/04_files/installdir/lib/auto/share/dist/Example_06/file0000644000175000017500000000000612220640677030013 0ustar kentkent06-oldFile-ShareDir-ProjectDistDir-0.5.2/t/04_developing_installed.t0000644000175000017500000000046712220640677022612 0ustar kentkent use strict; use warnings; use Test::More 0.96; use FindBin; use lib "$FindBin::Bin/04_files/installdir/lib"; use lib "$FindBin::Bin/04_files/develdir/lib"; # simulate testing in a child project. use Example_06; is( Example_06->test(), '06', 'Example 06 returns the right shared value' ); done_testing; File-ShareDir-ProjectDistDir-0.5.2/t/02_files/0000755000175000017500000000000012220640677017323 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/02_files/develdir/0000755000175000017500000000000012220640677021121 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/02_files/develdir/lib/0000755000175000017500000000000012220640677021667 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/02_files/develdir/lib/Example_03.pm0000644000175000017500000000032712220640677024124 0ustar kentkentuse strict; use warnings; package Example_03; #use File::ShareDir::ProjectDistDir; #use Path::Class::File; #sub test { # return scalar Path::Class::File->new( dist_file('Example_01', 'file') )->slurp(); #} 1; File-ShareDir-ProjectDistDir-0.5.2/t/02_files/develdir/.devdir0000644000175000017500000000000012220640677022365 0ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/02_files/develdir/share/0000755000175000017500000000000012220640677022223 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/02_files/develdir/share/file0000644000175000017500000000000312220640677023056 0ustar kentkent03 File-ShareDir-ProjectDistDir-0.5.2/t/02_files/installdir/0000755000175000017500000000000012220640677021470 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/02_files/installdir/lib/0000755000175000017500000000000012220640677022236 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/02_files/installdir/lib/auto/0000755000175000017500000000000012220640677023206 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/02_files/installdir/lib/auto/share/0000755000175000017500000000000012220640677024310 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/02_files/installdir/lib/auto/share/dist/0000755000175000017500000000000012220640677025253 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/02_files/installdir/lib/auto/share/dist/Example_02/0000755000175000017500000000000012220640677027147 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/02_files/installdir/lib/auto/share/dist/Example_02/file0000644000175000017500000000000212220640677030001 0ustar kentkent02File-ShareDir-ProjectDistDir-0.5.2/t/02_files/installdir/lib/Example_02.pm0000644000175000017500000000032412220640677024467 0ustar kentkentuse strict; use warnings; package Example_02; use File::ShareDir::ProjectDistDir; use Path::Class::File; sub test { return scalar Path::Class::File->new( dist_file( 'Example_02', 'file' ) )->slurp(); } 1; File-ShareDir-ProjectDistDir-0.5.2/t/05_devel_spec.t0000644000175000017500000000032312220640677020520 0ustar kentkent use strict; use warnings; use Test::More 0.96; use FindBin; use lib "$FindBin::Bin/05_files/lib"; use Example_05; is( Example_05->test(), '05', 'Example 05 returns the right shared value' ); done_testing; File-ShareDir-ProjectDistDir-0.5.2/t/03_files/0000755000175000017500000000000012220640677017324 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/03_files/develdir/0000755000175000017500000000000012220640677021122 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/03_files/develdir/lib/0000755000175000017500000000000012220640677021670 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/03_files/develdir/lib/Example_05.pm0000644000175000017500000000032412220640677024124 0ustar kentkentuse strict; use warnings; package Example_05; use File::ShareDir::ProjectDistDir; use Path::Class::File; sub test { return scalar Path::Class::File->new( dist_file( 'Example_05', 'file' ) )->slurp(); } 1; File-ShareDir-ProjectDistDir-0.5.2/t/03_files/develdir/.devdir0000644000175000017500000000000012220640677022366 0ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/03_files/develdir/share/0000755000175000017500000000000012220640677022224 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/03_files/develdir/share/file0000644000175000017500000000000212220640677023056 0ustar kentkent05File-ShareDir-ProjectDistDir-0.5.2/t/03_files/installdir/0000755000175000017500000000000012220640677021471 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/03_files/installdir/lib/0000755000175000017500000000000012220640677022237 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/03_files/installdir/lib/auto/0000755000175000017500000000000012220640677023207 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/03_files/installdir/lib/auto/share/0000755000175000017500000000000012220640677024311 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/03_files/installdir/lib/auto/share/dist/0000755000175000017500000000000012220640677025254 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/03_files/installdir/lib/auto/share/dist/Example_04/0000755000175000017500000000000012220640677027152 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/03_files/installdir/lib/auto/share/dist/Example_04/file0000644000175000017500000000000212220640677030004 0ustar kentkent04File-ShareDir-ProjectDistDir-0.5.2/t/03_files/installdir/lib/Example_04.pm0000644000175000017500000000032412220640677024472 0ustar kentkentuse strict; use warnings; package Example_04; use File::ShareDir::ProjectDistDir; use Path::Class::File; sub test { return scalar Path::Class::File->new( dist_file( 'Example_04', 'file' ) )->slurp(); } 1; File-ShareDir-ProjectDistDir-0.5.2/t/06_distname.t0000644000175000017500000000062412220640677020220 0ustar kentkent use strict; use warnings; use Test::More 0.96; use FindBin; use lib "$FindBin::Bin/06_files/installdir/lib"; use lib "$FindBin::Bin/06_files/develdir/lib"; # simulate testing in a child project. use Example_04; use Example_05; is( Example_04->test(), '04', 'Example 04 returns the right shared value' ); is( Example_05->test(), '05', 'Example 05 returns the right shared value' ); done_testing; File-ShareDir-ProjectDistDir-0.5.2/t/05_files/0000755000175000017500000000000012220640677017326 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/05_files/lib/0000755000175000017500000000000012220640677020074 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/05_files/lib/Example_05.pm0000644000175000017500000000036612220640677022336 0ustar kentkentuse strict; use warnings; package Example_05; use File::ShareDir::ProjectDistDir ':all', projectdir => 'templates'; use Path::Class::File; sub test { return scalar Path::Class::File->new( dist_file( 'Example_05', 'file' ) )->slurp(); } 1; File-ShareDir-ProjectDistDir-0.5.2/t/05_files/.devdir0000644000175000017500000000000012220640677020572 0ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/05_files/templates/0000755000175000017500000000000012220640677021324 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/05_files/templates/file0000644000175000017500000000000212220640677022156 0ustar kentkent05File-ShareDir-ProjectDistDir-0.5.2/t/02_installed_only.t0000644000175000017500000000046712220640677021435 0ustar kentkent use strict; use warnings; use Test::More 0.96; use FindBin; use lib "$FindBin::Bin/02_files/installdir/lib"; use lib "$FindBin::Bin/02_files/develdir/lib"; # simulate testing in a child project. use Example_02; is( Example_02->test(), '02', 'Example 02 returns the right shared value' ); done_testing; File-ShareDir-ProjectDistDir-0.5.2/t/00-compile.t0000644000175000017500000000165112220640677017755 0ustar kentkentuse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.033 use Test::More tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0); my @module_files = ( 'File/ShareDir/ProjectDistDir.pm' ); # no fake home requested use File::Spec; use IPC::Open3; use IO::Handle; my @warnings; for my $lib (@module_files) { # see L open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my $stderr = IO::Handle->new; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, '-Mblib', '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($? >> 8, 0, "$lib loaded ok"); if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING}; File-ShareDir-ProjectDistDir-0.5.2/t/000-report-versions-tiny.t0000644000175000017500000000623412220640677022551 0ustar kentkentuse strict; use warnings; use Test::More 0.88; # This is a relatively nice way to avoid Test::NoWarnings breaking our # expectations by adding extra tests, without using no_plan. It also helps # avoid any other test module that feels introducing random tests, or even # test plans, is a nice idea. our $success = 0; END { $success && done_testing; } # List our own version used to generate this my $v = "\nGenerated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.09\n"; eval { # no excuses! # report our Perl details my $want = '5.006'; $v .= "perl: $] (wanted $want) on $^O from $^X\n\n"; }; defined($@) and diag("$@"); # Now, our module version dependencies: sub pmver { my ($module, $wanted) = @_; $wanted = " (want $wanted)"; my $pmver; eval "require $module;"; if ($@) { if ($@ =~ m/Can't locate .* in \@INC/) { $pmver = 'module not found.'; } else { diag("${module}: $@"); $pmver = 'died during require.'; } } else { my $version; eval { $version = $module->VERSION; }; if ($@) { diag("${module}: $@"); $pmver = 'died during VERSION check.'; } elsif (defined $version) { $pmver = "$version"; } else { $pmver = ''; } } # So, we should be good, right? return sprintf('%-45s => %-10s%-15s%s', $module, $pmver, $wanted, "\n"); } eval { $v .= pmver('Carp','any version') }; eval { $v .= pmver('Dist::Zilla::PluginBundle::Author::KENTNL','v1.8.3') }; eval { $v .= pmver('Dist::Zilla::PluginBundle::Author::KENTNL::Lite','v1.3.0') }; eval { $v .= pmver('File::ShareDir','any version') }; eval { $v .= pmver('File::Spec','any version') }; eval { $v .= pmver('FindBin','any version') }; eval { $v .= pmver('IO::Handle','any version') }; eval { $v .= pmver('IPC::Open3','any version') }; eval { $v .= pmver('Module::Build','0.4007') }; eval { $v .= pmver('Path::Class::Dir','any version') }; eval { $v .= pmver('Path::Class::File','any version') }; eval { $v .= pmver('Path::FindDev','any version') }; eval { $v .= pmver('Path::IsDev','any version') }; eval { $v .= pmver('Path::Tiny','any version') }; eval { $v .= pmver('Pod::Coverage::TrustPod','any version') }; eval { $v .= pmver('Sub::Exporter','any version') }; eval { $v .= pmver('Test::CPAN::Changes','0.19') }; eval { $v .= pmver('Test::CPAN::Meta','any version') }; eval { $v .= pmver('Test::Kwalitee','1.08') }; eval { $v .= pmver('Test::More','0.98') }; eval { $v .= pmver('Test::Pod','1.41') }; eval { $v .= pmver('Test::Pod::Coverage','1.08') }; eval { $v .= pmver('lib','any version') }; eval { $v .= pmver('strict','any version') }; eval { $v .= pmver('version','0.9901') }; eval { $v .= pmver('warnings','any version') }; # All done. $v .= <<'EOT'; Thanks for using my code. I hope it works for you. If not, please try and include this output in the bug report. That will help me reproduce the issue and solve your problem. EOT diag($v); ok(1, "we really didn't test anything, just reporting data"); $success = 1; # Work around another nasty module on CPAN. :/ no warnings 'once'; $Template::Test::NO_FLUSH = 1; exit 0; File-ShareDir-ProjectDistDir-0.5.2/t/06_files/0000755000175000017500000000000012220640677017327 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/06_files/develdir/0000755000175000017500000000000012220640677021125 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/06_files/develdir/lib/0000755000175000017500000000000012220640677021673 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/06_files/develdir/lib/Example_05.pm0000644000175000017500000000035112220640677024127 0ustar kentkentuse strict; use warnings; package Example_05; use File::ShareDir::ProjectDistDir qw( :all ), distname => 'Example_05'; use Path::Class::File; sub test { return scalar Path::Class::File->new( dist_file('file') )->slurp(); } 1; File-ShareDir-ProjectDistDir-0.5.2/t/06_files/develdir/.devdir0000644000175000017500000000000012220640677022371 0ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/06_files/develdir/share/0000755000175000017500000000000012220640677022227 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/06_files/develdir/share/file0000644000175000017500000000000212220640677023061 0ustar kentkent05File-ShareDir-ProjectDistDir-0.5.2/t/06_files/installdir/0000755000175000017500000000000012220640677021474 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/06_files/installdir/lib/0000755000175000017500000000000012220640677022242 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/06_files/installdir/lib/auto/0000755000175000017500000000000012220640677023212 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/06_files/installdir/lib/auto/share/0000755000175000017500000000000012220640677024314 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/06_files/installdir/lib/auto/share/dist/0000755000175000017500000000000012220640677025257 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/06_files/installdir/lib/auto/share/dist/Example_04/0000755000175000017500000000000012220640677027155 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/06_files/installdir/lib/auto/share/dist/Example_04/file0000644000175000017500000000000212220640677030007 0ustar kentkent04File-ShareDir-ProjectDistDir-0.5.2/t/06_files/installdir/lib/Example_04.pm0000644000175000017500000000035112220640677024475 0ustar kentkentuse strict; use warnings; package Example_04; use File::ShareDir::ProjectDistDir qw( :all ), distname => "Example_04"; use Path::Class::File; sub test { return scalar Path::Class::File->new( dist_file('file') )->slurp(); } 1; File-ShareDir-ProjectDistDir-0.5.2/t/03_installed_and_dev_different.t0000644000175000017500000000062412220640677024076 0ustar kentkent use strict; use warnings; use Test::More 0.96; use FindBin; use lib "$FindBin::Bin/03_files/installdir/lib"; use lib "$FindBin::Bin/03_files/develdir/lib"; # simulate testing in a child project. use Example_04; use Example_05; is( Example_04->test(), '04', 'Example 04 returns the right shared value' ); is( Example_05->test(), '05', 'Example 05 returns the right shared value' ); done_testing; File-ShareDir-ProjectDistDir-0.5.2/t/01_files/0000755000175000017500000000000012220640677017322 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/01_files/lib/0000755000175000017500000000000012220640677020070 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/01_files/lib/Example_01.pm0000644000175000017500000000032412220640677022320 0ustar kentkentuse strict; use warnings; package Example_01; use File::ShareDir::ProjectDistDir; use Path::Class::File; sub test { return scalar Path::Class::File->new( dist_file( 'Example_01', 'file' ) )->slurp(); } 1; File-ShareDir-ProjectDistDir-0.5.2/t/01_files/.devdir0000644000175000017500000000000012220640677020566 0ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/01_files/share/0000755000175000017500000000000012220640677020424 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/t/01_files/share/file0000644000175000017500000000000212220640677021256 0ustar kentkent01File-ShareDir-ProjectDistDir-0.5.2/.travis.yml0000644000175000017500000000036112220640677017566 0ustar kentkentlanguage: perl perl: - "5.16" - "5.14" - "5.18" - "5.19" env: matrix: - STERILIZE_ENV=0 - STERILIZE_ENV=1 before_install: - perl ./maint-travis-ci/sterilize_env.pl branches: only: - "build/master" - "releases" File-ShareDir-ProjectDistDir-0.5.2/README0000644000175000017500000002474012220640677016344 0ustar kentkentNAME File::ShareDir::ProjectDistDir - Simple set-and-forget using of a '/share' directory in your projects root VERSION version 0.5.2 SYNOPSIS package An::Example::Package; use File::ShareDir::ProjectDistDir; # during development, $dir will be $projectroot/share # but once installed, it will be wherever File::Sharedir thinks it is. my $dir = dist_dir('An-Example') Project layout requirements: $project/ $project/lib/An/Example/Package.pm $project/share/ # files for package 'An-Example' go here. You can use a directory name other than 'share' ( Assuming you make sure when you install that, you specify the different directory there also ) as follows: use File::ShareDir::ProjectDistDir ':all', defaults => { projectdir => 'templates', }; METHODS import use File::ShareDir::ProjectDistDir (@args); This uses "Sub::Exporter" to do the heavy lifting, so most usage of this module can be maximised by understanding that first. * ":all" ->import( ':all' , .... ) Import both "dist_dir" and "dist_file" * "dist_dir" ->import('dist_dir' , .... ) Import the dist_dir method * "dist_dir" ->import('dist_file' , .... ) Import the dist_file method * "projectdir" ->import( .... , projectdir => 'share' ) Specify what the project directory is as a path relative to the base of your distributions source, and this directory will be used as a "ShareDir" simulation path for the exported methods *During development*. If not specified, the default value 'share' is used. * "filename" ->import( .... , filename => 'some/path/to/foo.pm' ); Generally you don't want to set this, as its worked out by caller() to work out the name of the file its being called from. This file's path is walked up to find the 'lib' element with a sibling of the name of your "projectdir". * "distname" ->import( .... , distname => 'somedistname' ); Specifying this argument changes the way the functions are emitted at *installed "runtime"*, so that instead of taking the standard arguments File::ShareDir does, the specification of the "distname" in those functions is eliminated. i.e: # without this flag use File::ShareDir::ProjectDistDir qw( :all ); my $dir = dist_dir('example'); my $file = dist_file('example', 'path/to/file.pm' ); # with this flag use File::ShareDir::ProjectDistDir ( qw( :all ), distname => 'example' ); my $dir = dist_dir(); my $file = dist_file('path/to/file.pm' ); * "defaults" ->import( ... , defaults => { filename => ...., projectdir => ...., }); This is mostly an alternative syntax for specifying "filename" and "projectdir", which is mostly used internally, and their corresponding other values are packed into this one. Sub::Exporter tricks of note. Make your own sharedir util package Foo::Util; sub import { my ($caller_class, $caller_file, $caller_line ) = caller(); if ( grep { /share/ } @_ ) { require File::ShareDir::ProjectDistDir; File::ShareDir::ProjectDistDir->import( filename => $caller_file, dist_dir => { distname => 'myproject' , -as => 'share' }, dist_dir => { distname => 'otherproject' , -as => 'other_share' , projectdir => 'share2' }, -into => $caller_class, ); } } .... package Foo; use Foo::Util qw( share ); my $dir = share(); my $other_dir => other_share(); build_dist_dir use File::ShareDir::ProjectDirDir ( : all ); # this calls my $coderef = File::ShareDir::ProjectDistDir->build_dist_dir( 'dist_dir' => {}, { defaults => { filename => 'path/to/yourcallingfile.pm', projectdir => 'share' } } ); use File::ShareDir::ProjectDirDir ( qw( :all ), distname => 'example-dist' ); # this calls my $coderef = File::ShareDir::ProjectDistDir->build_dist_dir( 'dist_dir' => {}, { distname => 'example-dist', defaults => { filename => 'path/to/yourcallingfile.pm', projectdir => 'share' } } ); use File::ShareDir::ProjectDirDir dist_dir => { distname => 'example-dist', -as => 'mydistdir' }, dist_dir => { distname => 'other-dist', -as => 'otherdistdir' }; # This calls my $coderef = File::ShareDir::ProjectDistDir->build_dist_dir( 'dist_dir', { distname => 'example-dist' }, { defaults => { filename => 'path/to/yourcallingfile.pm', projectdir => 'share' } }, ); my $othercoderef = File::ShareDir::ProjectDistDir->build_dist_dir( 'dist_dir', { distname => 'other-dist' }, { defaults => { filename => 'path/to/yourcallingfile.pm', projectdir => 'share' } }, ); # And leverages Sub::Exporter to create 2 subs in your package. Generates the exported 'dist_dir' method. In development environments, the generated method will return a path to the development directories 'share' directory. In non-development environments, this simply returns "File::ShareDir::dist_dir". As a result of this, specifying the Distribution name is not required during development, however, it will start to matter once it is installed. This is a potential avenues for bugs if you happen to name it wrong. build_dist_file use File::ShareDir::ProjectDirDir ( : all ); # this calls my $coderef = File::ShareDir::ProjectDistDir->build_dist_file( 'dist_file' => {}, { defaults => { filename => 'path/to/yourcallingfile.pm', projectdir => 'share' } } ); use File::ShareDir::ProjectDirDir ( qw( :all ), distname => 'example-dist' ); # this calls my $coderef = File::ShareDir::ProjectDistDir->build_dist_file( 'dist_file' => {}, { distname => 'example-dist', defaults => { filename => 'path/to/yourcallingfile.pm', projectdir => 'share' } } ); use File::ShareDir::ProjectDirDir dist_file => { distname => 'example-dist', -as => 'mydistfile' }, dist_file => { distname => 'other-dist', -as => 'otherdistfile' }; # This calls my $coderef = File::ShareDir::ProjectDistDir->build_dist_file( 'dist_file', { distname => 'example-dist' }, { defaults => { filename => 'path/to/yourcallingfile.pm', projectdir => 'share' } }, ); my $othercoderef = File::ShareDir::ProjectDistDir->build_dist_file( 'dist_file', { distname => 'other-dist' }, { defaults => { filename => 'path/to/yourcallingfile.pm', projectdir => 'share' } }, ); # And leverages Sub::Exporter to create 2 subs in your package. Generates the 'dist_file' method. In development environments, the generated method will return a path to the development directories 'share' directory. In non-development environments, this simply returns "File::ShareDir::dist_file". Caveats as a result of package-name as stated in "build_dist_dir" also apply to this method. SIGNIFICANT CHANGES 0.5.0 - Heuristics and Return type changes New "devdir" heuristic Starting with 0.5.0, instead of using our simple "lib/../share" pattern heuristic, a more advanced heuristic is used from the new "Path::FindDev" and "Path::IsDev". This relies on a more "concrete" marker somewhere at the top of your development tree, and more importantly, checks for the existence of specific files that are not likely to occur outside a project root. "lib" and "share" based heuristics were a little fragile, for a few reasons: * "lib" can, and does appear all over UNIX file systems, for purposes other than development project roots. For instance, have a look in "/usr/" /usr/bin /usr/lib /usr/share ## UHOH. This would have the very bad side effect of anything installed in "/usr/lib" thinking its "in development". Fortunately, nobody seems to have hit this specific bug, which I suspect is due only to "/usr/lib" being a symbolic link on most x86_64 systems. * "lib" is also reasonably common within "CPAN" package names. For instance: lib::abs Which means you'll have a hierarchy like: $PREFIX/lib/lib/abs All you need for something to go horribly wrong would be for somebody to install a "CPAN" module named: share::mystuff Or similar, and instantly, you have: $PREFIX/lib/lib/ $PREFIX/lib/share/ Which would mean any module calling itself "lib::*" would be unable to use this module. So instead, as of 0.5.0, the heuristic revolves around certain specific files being in the "dev" directory. Which is hopefully a more fault resilient mechanism. New Return Types Starting with 0.5.0, the internals are now based on "Path::Tiny" instead of "Path::Class", and as a result, there may be a few glitches in transition. Also, previously you could get a "Path::Class::*" object back from "dist_dir" and "dist_file" by importing it as such: use File::ShareDir::ProjectDistDir qw( dist_dir dist_file ), defaults => { pathclass => 1 }; Now you can also get "Path::Tiny" objects back, by passing: use File::ShareDir::ProjectDistDir qw( dist_dir dist_file ), defaults => { pathtiny => 1 }; For the time being, you can still get Path::Class objects back, but its likely to be deprecated in future. ( In fact, I may even make 2 specific sub-classes of "PDD" for people who want objects back, as it will make the "API" and the code much cleaner ) AUTHOR Kent Fredric COPYRIGHT AND LICENSE This software is copyright (c) 2013 by Kent Fredric . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. File-ShareDir-ProjectDistDir-0.5.2/META.yml0000644000175000017500000002456112220640677016736 0ustar kentkent--- abstract: "Simple set-and-forget using of a '/share' directory in your projects root" author: - 'Kent Fredric ' build_requires: File::Spec: 0 FindBin: 0 IO::Handle: 0 IPC::Open3: 0 Module::Build: 0.4007 Test::More: 0.98 lib: 0 configure_requires: Module::Build: 0.4007 dynamic_config: 0 generated_by: 'Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.132661' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: File-ShareDir-ProjectDistDir provides: File::ShareDir::ProjectDistDir: file: lib/File/ShareDir/ProjectDistDir.pm version: v0.5.2 requires: Carp: 0 File::ShareDir: 0 Path::Class::Dir: 0 Path::Class::File: 0 Path::FindDev: 0 Path::IsDev: 0 Path::Tiny: 0 Sub::Exporter: 0 perl: 5.006 strict: 0 warnings: 0 resources: bugtracker: https://github.com/kentfredric/File-ShareDir-ProjectDistDir/issues homepage: https://github.com/kentfredric/File-ShareDir-ProjectDistDir repository: https://github.com/kentfredric/File-ShareDir-ProjectDistDir.git version: 0.5.2 x_BuiltWith: modules: Carp: 1.32 Dist::Zilla::PluginBundle::Author::KENTNL: 1.8.3 Dist::Zilla::PluginBundle::Author::KENTNL::Lite: 1.7.2 File::ShareDir: 1.03 File::Spec: 3.44 FindBin: 1.51 IO::Handle: 1.35 IPC::Open3: 1.15 Module::Build: 0.4007 Path::Class::Dir: 0.32 Path::Class::File: 0.32 Path::FindDev: 0.3.1 Path::IsDev: 0.3.2 Path::Tiny: 0.037 Pod::Coverage::TrustPod: 0.100002 Sub::Exporter: 0.986 Test::CPAN::Changes: 0.23 Test::CPAN::Meta: 0.23 Test::Kwalitee: 1.15 Test::More: 0.98 Test::Pod: 1.48 Test::Pod::Coverage: 1.08 lib: 0.63 perl: 'NA(skipped: perl)' strict: 1.08 version: 0.9904 warnings: 1.18 perl: original: v5.19.3 qv: 1 version: - 5 - 19 - 3 perl-config: gccversion: 4.7.2 myarchname: x86_64-linux osname: linux platform: linux uname: 'Linux 3.11.1-gentoo x86_64 GenuineIntel GNU/Linux' x_Dist_Zilla: perl: version: 5.019003 plugins: - class: Dist::Zilla::Plugin::Git::NextVersion name: '@Author::KENTNL/Git::NextVersion' version: 2.014 - class: Dist::Zilla::Plugin::MetaConfig name: '@Author::KENTNL/MetaConfig' version: 4.300039 - class: Dist::Zilla::Plugin::GithubMeta name: '@Author::KENTNL/GithubMeta' version: 0.38 - class: Dist::Zilla::Plugin::FinderCode name: '@Author::KENTNL/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: 4.300039 - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: {} Dist::Zilla::Role::MetaProvider::Provider: inherit_missing: 1 inherit_version: 1 meta_noindex: 1 name: '@Author::KENTNL/MetaProvides::Package' version: 1.15000000 - class: Dist::Zilla::Plugin::MetaData::BuiltWith config: Dist::Zilla::Plugin::MetaData::BuiltWith: _stash_key: x_BuiltWith show_config: 1 show_uname: 1 uname: uname_args: - '-s' - '-o' - '-r' - '-m' - '-i' uname_call: uname name: '@Author::KENTNL/MetaData::BuiltWith' version: 0.03000100 - class: Dist::Zilla::Plugin::Git::GatherDir name: '@Author::KENTNL/Git::GatherDir' version: 2.014 - class: Dist::Zilla::Plugin::License name: '@Author::KENTNL/License' version: 4.300039 - class: Dist::Zilla::Plugin::MetaJSON name: '@Author::KENTNL/MetaJSON' version: 4.300039 - class: Dist::Zilla::Plugin::MetaYAML name: '@Author::KENTNL/MetaYAML' version: 4.300039 - class: Dist::Zilla::Plugin::Manifest name: '@Author::KENTNL/Manifest' version: 4.300039 - class: Dist::Zilla::Plugin::MetaTests name: '@Author::KENTNL/MetaTests' version: 4.300039 - class: Dist::Zilla::Plugin::PodCoverageTests name: '@Author::KENTNL/PodCoverageTests' version: 4.300039 - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@Author::KENTNL/PodSyntaxTests' version: 4.300039 - class: Dist::Zilla::Plugin::ReportVersions::Tiny name: '@Author::KENTNL/ReportVersions::Tiny' version: 1.09 - class: Dist::Zilla::Plugin::Test::Kwalitee name: '@Author::KENTNL/Test::Kwalitee' version: 2.06 - class: Dist::Zilla::Plugin::EOLTests name: '@Author::KENTNL/EOLTests' version: 0.02 - class: Dist::Zilla::Plugin::Test::MinimumVersion name: '@Author::KENTNL/Test::MinimumVersion' version: 2.000005 - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: module_finder: - ':InstallModules' script_finder: - ':ExecFiles' name: '@Author::KENTNL/Test::Compile' version: 2.033 - class: Dist::Zilla::Plugin::Test::Perl::Critic name: '@Author::KENTNL/Test::Perl::Critic' version: 2.112410 - class: Dist::Zilla::Plugin::PruneCruft name: '@Author::KENTNL/PruneCruft' version: 4.300039 - class: Dist::Zilla::Plugin::ManifestSkip name: '@Author::KENTNL/ManifestSkip' version: 4.300039 - class: Dist::Zilla::Plugin::PkgVersion name: '@Author::KENTNL/PkgVersion' version: 4.300039 - class: Dist::Zilla::Plugin::PodWeaver name: '@Author::KENTNL/PodWeaver' version: 3.101642 - class: Dist::Zilla::Plugin::NextRelease name: '@Author::KENTNL/NextRelease' version: 4.300039 - class: Dist::Zilla::Plugin::AutoPrereqs name: '@Author::KENTNL/AutoPrereqs' version: 4.300039 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: '@Author::KENTNL/Prereqs/BundleDevelNeeds' version: 4.300039 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: recommends name: '@Author::KENTNL/Prereqs/BundleDevelRecommends' version: 4.300039 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: suggests name: '@Author::KENTNL/Prereqs/BundleDevelSuggests' version: 4.300039 - class: Dist::Zilla::Plugin::Author::KENTNL::MinimumPerl name: '@Author::KENTNL/Author::KENTNL::MinimumPerl' version: 1.8.3 - class: Dist::Zilla::Plugin::Authority name: '@Author::KENTNL/Authority' version: 1.006 - class: Dist::Zilla::Plugin::ModuleBuild name: '@Author::KENTNL/ModuleBuild' version: 4.300039 - class: Dist::Zilla::Plugin::ReadmeFromPod name: '@Author::KENTNL/ReadmeFromPod' version: 0.18 - class: Dist::Zilla::Plugin::ReadmeAnyFromPod name: '@Author::KENTNL/ReadmeAnyFromPod' version: 0.131500 - class: Dist::Zilla::Plugin::Test::CPAN::Changes name: '@Author::KENTNL/Test::CPAN::Changes' version: 0.008 - class: Dist::Zilla::Plugin::CheckExtraTests name: '@Author::KENTNL/CheckExtraTests' version: 0.011 - class: Dist::Zilla::Plugin::TestRelease name: '@Author::KENTNL/TestRelease' version: 4.300039 - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Author::KENTNL/ConfirmRelease' version: 4.300039 - class: Dist::Zilla::Plugin::Git::Check name: '@Author::KENTNL/Git::Check' version: 2.014 - class: Dist::Zilla::Plugin::Git::Tag name: '@Author::KENTNL/Git::Tag/tag_master' version: 2.014 - class: Dist::Zilla::Plugin::Git::Commit name: '@Author::KENTNL/Git::Commit' version: 2.014 - class: Dist::Zilla::Plugin::Git::CommitBuild name: '@Author::KENTNL/Git::CommitBuild' version: 2.014 - class: Dist::Zilla::Plugin::Git::Tag name: '@Author::KENTNL/Git::Tag/tag_release' version: 2.014 - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Author::KENTNL/UploadToCPAN' version: 4.300039 - class: Dist::Zilla::Plugin::Twitter name: '@Author::KENTNL/Twitter' version: 0.021 - class: Dist::Zilla::Plugin::Prereqs::MatchInstalled config: Dist::Zilla::Plugin::Prereqs::MatchInstalled: applyto: - build.requires - build.recommends - build.suggests - test.requires - test.recommends - test.suggests - runtime.requires - runtime.recommends - runtime.suggests - configure.requires - configure.recommends - configure.suggests - develop.requires - develop.recommends - develop.suggests applyto_phase: - build - test - runtime - configure - develop applyto_relation: - requires - recommends - suggests modules: - Module::Build - Test::More - Dist::Zilla::PluginBundle::Author::KENTNL name: '@Author::KENTNL/Prereqs::MatchInstalled' version: 0.1.3 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: requires name: Prereqs version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: 4.300039 zilla: class: Dist::Zilla::Dist::Builder config: is_trial: 0 version: 4.300039 x_authority: cpan:KENTNL File-ShareDir-ProjectDistDir-0.5.2/perlcritic.rc0000644000175000017500000000120512220640677020141 0ustar kentkentseverity = 1 exclude = RequireTidyCode RequirePodSections ProhibitPostfixControls RequireRcsKeywords RequireExplicitPackage include = Moose::ProhibitMultipleWiths Moose::ProhibitNewMethod Moose::RequireCleanNamespace Moose::RequireMakeImmutable color = 1 verbose = 9 [BuiltinFunctions::ProhibitStringyEval] allow_includes = 1 [CodeLayout::ProhibitTrailingWhitespace] [Documentation::PodSpelling] stop_words = maximised [Subroutines::ProhibitUnusedPrivateSubroutines] private_name_regex = _(?!build_)\w [TestingAndDebugging::RequireUseStrict] equivalent_modules = Moose [TestingAndDebugging::RequireUseWarnings] equivalent_modules = Moose File-ShareDir-ProjectDistDir-0.5.2/dist.ini0000644000175000017500000000130012220640677017113 0ustar kentkent; Generated by Dist::Zilla::Plugin::Author::KENTNL::DistINI version 1.0.5 at Fri Apr 8 10:40:45 2011 name = File-ShareDir-ProjectDistDir author = Kent Fredric license = Perl_5 copyright_holder = Kent Fredric ; Uncomment this to bootstrap via self ; [Bootstrap::lib] [@Author::KENTNL] git_versions = 1 no_fiveten = 1 ;version_major = 0 ;version_minor = 1 ; the following data denotes when this minor was minted ;version_rel_year = 2011 ;version_rel_month = 4 ;version_rel_day = 8 ;version_rel_hour = 10 ;version_rel_time_zone = Pacific/Auckland twitter_hash_tags = #perl #cpan auto_prereqs_skip = ^Example_ [Prereqs] File-ShareDir-ProjectDistDir-0.5.2/maint-travis-ci/0000755000175000017500000000000012220640677020464 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/maint-travis-ci/README.mkdn0000644000175000017500000000261712220640677022302 0ustar kentkent# ABOUT This repository contains a directory full of utilities to bolt on to CPAN-targeting distributions, to add useful `travis-ci` features to those dists. # PREREQS All that is needed at present to get started, is a copy of `git` that provides `git subtree`, and a copy of `Path::FindDev` from `CPAN`. You don't need `Path::FindDev` during deployment, its just used to streamline automated patching. # INSTALLING First, check out a copy of these scripts, it can be a temporary directory, and you'll only need to do this once. ```shell $ mkdir /tmp/tci-scripts $ cd /tmp/tci-scripts $ git clone https://github.com/kentfredric/travis-scripts.git ``` Then, chdir to the root of your project ```shell $ chdir $PROJECT ``` And lastly, execute the installer ```shell $ /tmp/tci-scripts/sync_tree.pl ``` This will create the folder called `maint-travis-ci` within your distribution, with a tree installed by `git subtree`, which will track this distribution. To update your copy of `/maint-travis-ci` to the latest, simply execute ```shell $ $PROJECT/maint-travis-ci/sync_tree.pl ``` While somewhere in your project. # CAVEATS Note, this tool uses `Path::FindDev`, and by proxy, `Path::IsDev` to find a development root directory somewhere in the ancestry of `$CWD`. As such, you will likely need to appease `Path::IsDev` by having a file of some description that marks the root of the development tree. File-ShareDir-ProjectDistDir-0.5.2/maint-travis-ci/sync_tree.pl0000755000175000017500000000107512220640677023022 0ustar kentkent#!/usr/bin/env perl use strict; use warnings; use utf8; use Path::FindDev qw( find_dev ); my $root = find_dev('./'); chdir "$root"; sub git_subtree { system( 'git', 'subtree', @_ ) == 0 or die "Git subtree had nonzero exit"; } my $travis = 'https://github.com/kentfredric/travis-scripts.git'; my $prefix = 'maint-travis-ci'; if ( not -d -e $root->child($prefix) ) { git_subtree( 'add', '--prefix=' . $prefix, $travis, 'master' ); } else { git_subtree( 'pull', '-m', 'Synchronise git subtree maint-travis-ci', '--prefix=' . $prefix, $travis, 'master' ); } File-ShareDir-ProjectDistDir-0.5.2/maint-travis-ci/yamls/0000755000175000017500000000000012220640677021611 5ustar kentkentFile-ShareDir-ProjectDistDir-0.5.2/maint-travis-ci/yamls/sterile.yaml0000644000175000017500000000036112220640677024144 0ustar kentkentlanguage: perl perl: - "5.16" - "5.14" - "5.18" - "5.19" env: matrix: - STERILIZE_ENV=0 - STERILIZE_ENV=1 before_install: - perl ./maint-travis-ci/sterilize_env.pl branches: only: - "build/master" - "releases" File-ShareDir-ProjectDistDir-0.5.2/maint-travis-ci/sterilize_env.pl0000644000175000017500000000121412220640677023701 0ustar kentkent#!/usr/bin/env perl use strict; use warnings; use utf8; sub diag { print STDERR @_; print STDERR "\n"; } if ( not exists $ENV{STERILIZE_ENV} ) { diag('STERILIZE_ENV unset'); exit 0; } if ( $ENV{STERILIZE_ENV} < 1 ) { diag('STERLIZIE_ENV < 1, Not Sterilizing'); exit 0; } if ( not exists $ENV{TRAVIS} ) { diag('Is not running under travis!'); exit 1; } for my $i (@INC) { next if $i !~ /site/; next if $i eq '.'; diag( 'Sterilizing files in ' . $i ); system( 'find', $i, '-type', 'f', '-delete' ); diag( 'Sterilizing dirs in ' . $i ); system( 'find', $i, '-depth', '-type', 'd', '-delete' ); } File-ShareDir-ProjectDistDir-0.5.2/maint-travis-ci/merge_travis_yml.pl0000644000175000017500000000123212220640677024367 0ustar kentkent#!/usr/bin/env perl use strict; use warnings; use utf8; use Path::FindDev qw( find_dev ); my $hashref = {}; my $template = find_dev('./')->child('.travis-template.yml'); my $target = find_dev('./')->child('.travis.yml'); if ( -f -e $template ) { require YAML::Loader; my $loader = YAML::Loader->new(); $hashref = $loader->load( $template->slurp ); } if ( not exists $hashref->{language} ) { $hashref->{language} = 'perl'; } if ( not exists $hashref->{perl} ) { $hashref->{perl} = [ '5.18', '5.19' ]; } use Data::Dump qw(pp); pp($hashref); require YAML::Dumper; my $dumper = YAML::Dumper->new(); $target->spew( $dumper->dump($hashref) ); File-ShareDir-ProjectDistDir-0.5.2/.perltidyrc0000644000175000017500000000001412220640677017632 0ustar kentkent-i 2 -l 130 File-ShareDir-ProjectDistDir-0.5.2/META.json0000644000175000017500000004041212220640677017077 0ustar kentkent{ "abstract" : "Simple set-and-forget using of a '/share' directory in your projects root", "author" : [ "Kent Fredric " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.132661", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "File-ShareDir-ProjectDistDir", "prereqs" : { "build" : { "requires" : { "Module::Build" : "0.4007" } }, "configure" : { "requires" : { "Module::Build" : "0.4007" } }, "develop" : { "recommends" : { "Dist::Zilla::PluginBundle::Author::KENTNL::Lite" : "v1.3.0" }, "requires" : { "Dist::Zilla::PluginBundle::Author::KENTNL::Lite" : "0", "Pod::Coverage::TrustPod" : "0", "Test::CPAN::Changes" : "0.19", "Test::CPAN::Meta" : "0", "Test::Kwalitee" : "1.08", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08", "version" : "0.9901" }, "suggests" : { "Dist::Zilla::PluginBundle::Author::KENTNL" : "v1.8.3" } }, "runtime" : { "requires" : { "Carp" : "0", "File::ShareDir" : "0", "Path::Class::Dir" : "0", "Path::Class::File" : "0", "Path::FindDev" : "0", "Path::IsDev" : "0", "Path::Tiny" : "0", "Sub::Exporter" : "0", "perl" : "5.006", "strict" : "0", "warnings" : "0" } }, "test" : { "requires" : { "File::Spec" : "0", "FindBin" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Test::More" : "0.98", "lib" : "0" } } }, "provides" : { "File::ShareDir::ProjectDistDir" : { "file" : "lib/File/ShareDir/ProjectDistDir.pm", "version" : "v0.5.2" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/kentfredric/File-ShareDir-ProjectDistDir/issues" }, "homepage" : "https://github.com/kentfredric/File-ShareDir-ProjectDistDir", "repository" : { "type" : "git", "url" : "https://github.com/kentfredric/File-ShareDir-ProjectDistDir.git", "web" : "https://github.com/kentfredric/File-ShareDir-ProjectDistDir" } }, "version" : "0.5.2", "x_BuiltWith" : { "modules" : { "Carp" : "1.32", "Dist::Zilla::PluginBundle::Author::KENTNL" : "1.8.3", "Dist::Zilla::PluginBundle::Author::KENTNL::Lite" : "1.7.2", "File::ShareDir" : "1.03", "File::Spec" : "3.44", "FindBin" : "1.51", "IO::Handle" : "1.35", "IPC::Open3" : "1.15", "Module::Build" : "0.4007", "Path::Class::Dir" : "0.32", "Path::Class::File" : "0.32", "Path::FindDev" : "0.3.1", "Path::IsDev" : "0.3.2", "Path::Tiny" : "0.037", "Pod::Coverage::TrustPod" : "0.100002", "Sub::Exporter" : "0.986", "Test::CPAN::Changes" : "0.23", "Test::CPAN::Meta" : "0.23", "Test::Kwalitee" : "1.15", "Test::More" : "0.98", "Test::Pod" : "1.48", "Test::Pod::Coverage" : "1.08", "lib" : "0.63", "perl" : "NA(skipped: perl)", "strict" : "1.08", "version" : "0.9904", "warnings" : "1.18" }, "perl" : { "original" : "v5.19.3", "qv" : 1, "version" : [ 5, 19, 3 ] }, "perl-config" : { "gccversion" : "4.7.2", "myarchname" : "x86_64-linux", "osname" : "linux" }, "platform" : "linux", "uname" : "Linux 3.11.1-gentoo x86_64 GenuineIntel GNU/Linux" }, "x_Dist_Zilla" : { "perl" : { "version" : "5.019003" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Git::NextVersion", "name" : "@Author::KENTNL/Git::NextVersion", "version" : "2.014" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Author::KENTNL/MetaConfig", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "@Author::KENTNL/GithubMeta", "version" : "0.38" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@Author::KENTNL/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : {}, "Dist::Zilla::Role::MetaProvider::Provider" : { "inherit_missing" : "1", "inherit_version" : "1", "meta_noindex" : "1" } }, "name" : "@Author::KENTNL/MetaProvides::Package", "version" : "1.15000000" }, { "class" : "Dist::Zilla::Plugin::MetaData::BuiltWith", "config" : { "Dist::Zilla::Plugin::MetaData::BuiltWith" : { "_stash_key" : "x_BuiltWith", "show_config" : "1", "show_uname" : "1", "uname" : { "uname_args" : [ "-s", "-o", "-r", "-m", "-i" ], "uname_call" : "uname" } } }, "name" : "@Author::KENTNL/MetaData::BuiltWith", "version" : "0.03000100" }, { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "name" : "@Author::KENTNL/Git::GatherDir", "version" : "2.014" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@Author::KENTNL/License", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Author::KENTNL/MetaJSON", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Author::KENTNL/MetaYAML", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Author::KENTNL/Manifest", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::MetaTests", "name" : "@Author::KENTNL/MetaTests", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::PodCoverageTests", "name" : "@Author::KENTNL/PodCoverageTests", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@Author::KENTNL/PodSyntaxTests", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::ReportVersions::Tiny", "name" : "@Author::KENTNL/ReportVersions::Tiny", "version" : "1.09" }, { "class" : "Dist::Zilla::Plugin::Test::Kwalitee", "name" : "@Author::KENTNL/Test::Kwalitee", "version" : "2.06" }, { "class" : "Dist::Zilla::Plugin::EOLTests", "name" : "@Author::KENTNL/EOLTests", "version" : "0.02" }, { "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", "name" : "@Author::KENTNL/Test::MinimumVersion", "version" : "2.000005" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "module_finder" : [ ":InstallModules" ], "script_finder" : [ ":ExecFiles" ] } }, "name" : "@Author::KENTNL/Test::Compile", "version" : "2.033" }, { "class" : "Dist::Zilla::Plugin::Test::Perl::Critic", "name" : "@Author::KENTNL/Test::Perl::Critic", "version" : "2.112410" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@Author::KENTNL/PruneCruft", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@Author::KENTNL/ManifestSkip", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::PkgVersion", "name" : "@Author::KENTNL/PkgVersion", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "name" : "@Author::KENTNL/PodWeaver", "version" : "3.101642" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@Author::KENTNL/NextRelease", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@Author::KENTNL/AutoPrereqs", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "@Author::KENTNL/Prereqs/BundleDevelNeeds", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "recommends" } }, "name" : "@Author::KENTNL/Prereqs/BundleDevelRecommends", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "suggests" } }, "name" : "@Author::KENTNL/Prereqs/BundleDevelSuggests", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Author::KENTNL::MinimumPerl", "name" : "@Author::KENTNL/Author::KENTNL::MinimumPerl", "version" : "1.8.3" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@Author::KENTNL/Authority", "version" : "1.006" }, { "class" : "Dist::Zilla::Plugin::ModuleBuild", "name" : "@Author::KENTNL/ModuleBuild", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::ReadmeFromPod", "name" : "@Author::KENTNL/ReadmeFromPod", "version" : "0.18" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "name" : "@Author::KENTNL/ReadmeAnyFromPod", "version" : "0.131500" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", "name" : "@Author::KENTNL/Test::CPAN::Changes", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::CheckExtraTests", "name" : "@Author::KENTNL/CheckExtraTests", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Author::KENTNL/TestRelease", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Author::KENTNL/ConfirmRelease", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "name" : "@Author::KENTNL/Git::Check", "version" : "2.014" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "name" : "@Author::KENTNL/Git::Tag/tag_master", "version" : "2.014" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "name" : "@Author::KENTNL/Git::Commit", "version" : "2.014" }, { "class" : "Dist::Zilla::Plugin::Git::CommitBuild", "name" : "@Author::KENTNL/Git::CommitBuild", "version" : "2.014" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "name" : "@Author::KENTNL/Git::Tag/tag_release", "version" : "2.014" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Author::KENTNL/UploadToCPAN", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Twitter", "name" : "@Author::KENTNL/Twitter", "version" : "0.021" }, { "class" : "Dist::Zilla::Plugin::Prereqs::MatchInstalled", "config" : { "Dist::Zilla::Plugin::Prereqs::MatchInstalled" : { "applyto" : [ "build.requires", "build.recommends", "build.suggests", "test.requires", "test.recommends", "test.suggests", "runtime.requires", "runtime.recommends", "runtime.suggests", "configure.requires", "configure.recommends", "configure.suggests", "develop.requires", "develop.recommends", "develop.suggests" ], "applyto_phase" : [ "build", "test", "runtime", "configure", "develop" ], "applyto_relation" : [ "requires", "recommends", "suggests" ], "modules" : [ "Module::Build", "Test::More", "Dist::Zilla::PluginBundle::Author::KENTNL" ] } }, "name" : "@Author::KENTNL/Prereqs::MatchInstalled", "version" : "0.1.3" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "requires" } }, "name" : "Prereqs", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "4.300039" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "4.300039" } }, "x_authority" : "cpan:KENTNL" } File-ShareDir-ProjectDistDir-0.5.2/weaver.ini0000644000175000017500000000127212220640677017451 0ustar kentkent[@CorePrep] [Name] [Version] [Region / prelude] [Generic / SYNOPSIS] [Generic / DESCRIPTION] [Generic / OVERVIEW] ;[Generic / METHODS] ;[Collect / METHODS] [Collect / METHODS] command = method [Collect / ATTRIBUTES] command = attr ;[Collect / FILTER_METHODS] ;header = FILTER METHODS ;command = filter ;[Collect / TERMINATOR_LIST_METHODS] ;header = TERMINATOR LIST METHODS ;command = terminator ;[Collect / MIRROR_LIST_METHODS] ;header = MIRROR LIST METHODS ;command = mirrorlist [Collect / PRIVATE_ATTRIBUTES] header = PRIVATE ATTRIBUTES command = p_attr [Collect / PRIVATE_METHODS] header = PRIVATE METHODS command = p_method [Leftovers] [Region / postlude] [Authors] [Legal] File-ShareDir-ProjectDistDir-0.5.2/MANIFEST0000644000175000017500000000310012220640677016600 0ustar kentkent.perltidyrc .travis.yml Build.PL Changes LICENSE MANIFEST META.json META.yml README dist.ini lib/File/ShareDir/ProjectDistDir.pm maint-travis-ci/README.mkdn maint-travis-ci/merge_travis_yml.pl maint-travis-ci/sterilize_env.pl maint-travis-ci/sync_tree.pl maint-travis-ci/yamls/sterile.yaml perlcritic.rc t/00-compile.t t/000-report-versions-tiny.t t/01_devel.t t/01_files/.devdir t/01_files/lib/Example_01.pm t/01_files/share/file t/02_files/develdir/.devdir t/02_files/develdir/lib/Example_03.pm t/02_files/develdir/share/file t/02_files/installdir/lib/Example_02.pm t/02_files/installdir/lib/auto/share/dist/Example_02/file t/02_installed_only.t t/03_files/develdir/.devdir t/03_files/develdir/lib/Example_05.pm t/03_files/develdir/share/file t/03_files/installdir/lib/Example_04.pm t/03_files/installdir/lib/auto/share/dist/Example_04/file t/03_installed_and_dev_different.t t/04_developing_installed.t t/04_files/develdir/.devdir t/04_files/develdir/lib/Example_06.pm t/04_files/develdir/share/file t/04_files/installdir/lib/Example_06.pm t/04_files/installdir/lib/auto/share/dist/Example_06/file t/05_devel_spec.t t/05_files/.devdir t/05_files/lib/Example_05.pm t/05_files/templates/file t/06_distname.t t/06_files/develdir/.devdir t/06_files/develdir/lib/Example_05.pm t/06_files/develdir/share/file t/06_files/installdir/lib/Example_04.pm t/06_files/installdir/lib/auto/share/dist/Example_04/file weaver.ini xt/author/critic.t xt/release/cpan-changes.t xt/release/distmeta.t xt/release/eol.t xt/release/kwalitee.t xt/release/minimum-version.t xt/release/pod-coverage.t xt/release/pod-syntax.t