File-Flat-1.05/000700 000766 000024 00000000000 13411760707 013451 5ustar00etherstaff000000 000000 File-Flat-1.05/Changes000600 000766 000024 00000005315 13411760707 014752 0ustar00etherstaff000000 000000 Revision history for Perl extension File::Flat. 1.05 2018-12-29 21:06:09Z - distribution tooling updates 1.04 2008-03-24 - Removing dependency on File::Slurp 1.03 2008-03-01 - Incremental release to clear out some CPAN Testers failures - No need to upgrade 1.02 2007-12-11 - Cygwin is clearly insane, skip root and win32 test sets - More aggressive dependencies, particularly on Win32 1.01 2007-12-11 - No functional changes - Correcting dependency - Updating to Module::Install 0.68 - Updating bundled tests 1.00 2007-01-14 - FINALLY completed full functionality on Win32 0.96 2006-07-19 - Moving from CVS to new SVN repository - Upgrading to Module::Install 0.95 2004-11-06 - More cached stats - Using prefork.pm to preload File:: modules in forking scenarios 0.94 2004-10-05 - After discovering CVS Monitor was using a private method, and now breaks, added an alias back in. No user-visible changes. 0.93 2004-09-28 - Broke out API tests to use proper Test::ClassAPI testing - Removed use of, bundling of, and direct dependency on Class::Inspector - Added general support for pruning - Added File::Flat::prune static method - Added File::Flat::Object::prune instance method - Added full unit testing for the prune methods - Added full POD for the methods, and $AUTO_PRUNE - Added fixes or workarounds to resolve a number of warnings - Moved Makefile.PL to a Module::Install-based one 0.92 2004-07-26 - Converting to use File::Slurp where appropriate - Upgraded dependencies to the new File::Spec version of File::Remove - Updated dependency list 0.91 2003-10-14 19:31:00 - Instead of letting File::Spec->rel2abs contantly do slow forking Cwd::_backtick_pwd calls constantly. Use the faster Cwd::getcwd FIRST, and pass it to rel2abs as the $base value. 0.9 2003-07-25 21:00:12 - Following prompting from Schwern, implemented a bunch of test related changes, to try and get File::Flat to build/test/run on non-Unix platforms. 0.8 2003-05-07 00:56:21 - Bug in the test script, fixed 0.7 2003-05-06 23:58:54 - IO::File cannot be autoloaded. Always load it 0.6 2002-12-08 23:24:15 - Fixes a bug where the tests will fail is run as root 0.5 2002-11-28 15:19:32 - Fixed a bug that caused large amounts of warnings to be generated when ->canWrite, ->write, ->makeDirectory was used. 0.4 2002-11-22 14:38:23 - Fixed a significant bug in makeDirectory 0.3 2002-11-20 14:21:54 - Added Class::Autouse to Makefile 0.2 2002-11-18 15:37:23 - Completed main method set - Added full testing suite ( 73% coverage ) - Added documentation 0.1 2002-05-23 21:01:52 - original version File-Flat-1.05/CONTRIBUTING000644 000766 000024 00000007036 13411760707 015323 0ustar00etherstaff000000 000000 CONTRIBUTING Thank you for considering contributing to this distribution. This file contains instructions that will help you work with the source code. PLEASE NOTE that if you have any questions or difficulties, you can reach the maintainer(s) through the bug queue described later in this document (preferred), or by emailing the releaser directly. You are not required to follow any of the steps in this document to submit a patch or bug report; these are just recommendations, intended to help you (and help us help you faster). The distribution is managed with Dist::Zilla (https://metacpan.org/release/Dist-Zilla). This means than many of the usual files you might expect are not in the repository, but are generated at release time (e.g. Makefile.PL). However, you can run tests directly using the 'prove' tool: $ prove -l $ prove -lv t/some_test_file.t $ prove -lvr t/ In most cases, 'prove' is entirely sufficient for you to test any patches you have. You may need to satisfy some dependencies. The easiest way to satisfy dependencies is to install the last release -- this is available at https://metacpan.org/release/File-Flat If you use cpanminus, you can do it without downloading the tarball first: $ cpanm --reinstall --installdeps --with-recommends File::Flat Dist::Zilla is a very powerful authoring tool, but requires a number of author-specific plugins. If you would like to use it for contributing, install it from CPAN, then run one of the following commands, depending on your CPAN client: $ cpan `dzil authordeps --missing` or $ dzil authordeps --missing | cpanm You should then also install any additional requirements not needed by the dzil build but may be needed by tests or other development: $ cpan `dzil listdeps --author --missing` or $ dzil listdeps --author --missing | cpanm Or, you can use the 'dzil stale' command to install all requirements at once: $ cpan Dist::Zilla::App::Command::stale $ cpan `dzil stale --all` or $ cpanm Dist::Zilla::App::Command::stale $ dzil stale --all | cpanm You can also do this via cpanm directly: $ cpanm --reinstall --installdeps --with-develop --with-recommends File::Flat Once installed, here are some dzil commands you might try: $ dzil build $ dzil test $ dzil test --release $ dzil xtest $ dzil listdeps --json $ dzil build --notgz You can learn more about Dist::Zilla at http://dzil.org/. The code for this distribution is hosted at GitHub. The repository is: https://github.com/karenetheridge/File-Flat You can submit code changes by forking the repository, pushing your code changes to your clone, and then submitting a pull request. Detailed instructions for doing that is available here: https://help.github.com/articles/creating-a-pull-request If you have found a bug, but do not have an accompanying patch to fix it, you can submit an issue report here: https://rt.cpan.org/Public/Dist/Display.html?Name=File-Flat or via email: bug-File-Flat@rt.cpan.org This is a good place to send your questions about the usage of this distribution. If you send me a patch or pull request, your name and email address will be included in the documentation as a contributor (using the attribution on the commit or patch), unless you specifically request for it not to be. If you wish to be listed under a different name or address, you should submit a pull request to the .mailmap file to contain the correct mapping. This file was generated via Dist::Zilla::Plugin::GenerateFile::FromShareDir 0.014 from a template file originating in Dist-Zilla-PluginBundle-Author-ETHER-0.145. File-Flat-1.05/dist.ini000600 000766 000024 00000000571 13411760707 015122 0ustar00etherstaff000000 000000 name = File-Flat author = Adam Kennedy copyright_holder = Adam Kennedy copyright_year = 2002 license = Perl_5 [@Author::ETHER] :version = 0.119 authority = cpan:ADAMK installer = MakeMaker -remove = Test::EOL -remove = Test::NoTabs -remove = PodCoverageTests [Encoding] encoding = bytes filename = t/ff_binary File-Flat-1.05/INSTALL000644 000766 000024 00000004310 13411760707 014512 0ustar00etherstaff000000 000000 This is the Perl distribution File-Flat. Installing File-Flat is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm File::Flat If it does not have permission to install modules to the current perl, cpanm will automatically set up and install to a local::lib in your home directory. See the local::lib documentation (https://metacpan.org/pod/local::lib) for details on enabling it in your environment. ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan File::Flat ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, install configure prerequisites (see below), then build it: % perl Makefile.PL % make && make test Then install it: % make install On Windows platforms, you should use `dmake` or `nmake`, instead of `make`. If your perl is system-managed, you can create a local::lib in your home directory to install modules to. For details, see the local::lib documentation: https://metacpan.org/pod/local::lib The prerequisites of this distribution will also have to be installed manually. The prerequisites are listed in one of the files: `MYMETA.yml` or `MYMETA.json` generated by running the manual build process described above. ## Configure Prerequisites This distribution requires other modules to be installed before this distribution's installer can be run. They can be found under the "configure_requires" key of META.yml or the "{prereqs}{configure}{requires}" key of META.json. ## Other Prerequisites This distribution may require additional modules to be installed after running Makefile.PL. Look for prerequisites in the following phases: * to run make, PHASE = build * to use the module code itself, PHASE = runtime * to run tests, PHASE = test They can all be found in the "PHASE_requires" key of MYMETA.yml or the "{prereqs}{PHASE}{requires}" key of MYMETA.json. ## Documentation File-Flat documentation is available as POD. You can run `perldoc` from a shell to read the documentation: % perldoc File::Flat For more information on installing Perl modules via CPAN, please see: https://www.cpan.org/modules/INSTALL.html File-Flat-1.05/lib/000700 000766 000024 00000000000 13411760707 014217 5ustar00etherstaff000000 000000 File-Flat-1.05/LICENSE000644 000766 000024 00000043655 13411760707 014505 0ustar00etherstaff000000 000000 This software is copyright (c) 2002 by Adam Kennedy. 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) 2002 by Adam Kennedy. 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, Fifth Floor, Boston, MA 02110-1301 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) 2002 by Adam Kennedy. 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-Flat-1.05/Makefile.PL000644 000766 000024 00000003225 13411760707 015437 0ustar00etherstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.012. use strict; use warnings; use 5.006; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "Implements a flat filesystem", "AUTHOR" => "Adam Kennedy ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "File-Flat", "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.006", "NAME" => "File::Flat", "PREREQ_PM" => { "Cwd" => 0, "File::Copy" => 0, "File::Copy::Recursive" => 0, "File::Remove" => 0, "File::Spec" => 0, "File::Temp" => 0, "IO::File" => 0, "prefork" => 0, "strict" => 0 }, "TEST_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "File::Find" => 0, "File::Spec" => 0, "File::Spec::Functions" => 0, "Test::ClassAPI" => 0, "Test::More" => 0, "vars" => 0, "warnings" => 0 }, "VERSION" => "1.05", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Cwd" => 0, "ExtUtils::MakeMaker" => 0, "File::Copy" => 0, "File::Copy::Recursive" => 0, "File::Find" => 0, "File::Remove" => 0, "File::Spec" => 0, "File::Spec::Functions" => 0, "File::Temp" => 0, "IO::File" => 0, "Test::ClassAPI" => 0, "Test::More" => 0, "prefork" => 0, "strict" => 0, "vars" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); File-Flat-1.05/MANIFEST000644 000766 000024 00000001174 13411760707 014617 0ustar00etherstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.012. CONTRIBUTING Changes INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README dist.ini lib/File/Flat.pm t/00-report-prereqs.dd t/00-report-prereqs.t t/01_compile.t t/02_api.t t/03_main.t t/ff_binary t/ff_content t/ff_text xt/author/00-compile.t xt/author/changes_has_content.t xt/author/clean-namespaces.t xt/author/kwalitee.t xt/author/minimum-version.t xt/author/mojibake.t xt/author/pod-no404s.t xt/author/pod-spell.t xt/author/pod-syntax.t xt/author/portability.t xt/release/changes_has_content.t xt/release/cpan-changes.t xt/release/distmeta.t File-Flat-1.05/META.json000644 000766 000024 00000125354 13411760707 015116 0ustar00etherstaff000000 000000 { "abstract" : "Implements a flat filesystem", "author" : [ "Adam Kennedy " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "File-Flat", "no_index" : { "directory" : [ "t", "xt" ] }, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0", "perl" : "5.006" } }, "develop" : { "recommends" : { "Dist::Zilla::PluginBundle::Author::ETHER" : "0.145", "Dist::Zilla::PluginBundle::Git::VersionManager" : "0.007" }, "requires" : { "Encode" : "0", "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Pod::Wordlist" : "0", "Test::CPAN::Changes" : "0.19", "Test::CPAN::Meta" : "0", "Test::CleanNamespaces" : "0.15", "Test::Kwalitee" : "1.21", "Test::MinimumVersion" : "0", "Test::Mojibake" : "0", "Test::More" : "0.96", "Test::Pod" : "1.41", "Test::Pod::No404s" : "0", "Test::Portability::Files" : "0", "Test::Spelling" : "0.12", "perl" : "5.006", "warnings" : "0" } }, "runtime" : { "requires" : { "Cwd" : "0", "File::Copy" : "0", "File::Copy::Recursive" : "0", "File::Remove" : "0", "File::Spec" : "0", "File::Temp" : "0", "IO::File" : "0", "perl" : "5.006", "prefork" : "0", "strict" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "ExtUtils::MakeMaker" : "0", "File::Find" : "0", "File::Spec" : "0", "File::Spec::Functions" : "0", "Test::ClassAPI" : "0", "Test::More" : "0", "perl" : "5.006", "vars" : "0", "warnings" : "0" } }, "x_Dist_Zilla" : { "requires" : { "Dist::Zilla" : "5", "Dist::Zilla::Plugin::Authority" : "1.009", "Dist::Zilla::Plugin::AutoMetaResources" : "0", "Dist::Zilla::Plugin::AutoPrereqs" : "5.038", "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : "0.004", "Dist::Zilla::Plugin::CheckIssues" : "0", "Dist::Zilla::Plugin::CheckMetaResources" : "0", "Dist::Zilla::Plugin::CheckPrereqsIndexed" : "0.019", "Dist::Zilla::Plugin::CheckSelfDependency" : "0", "Dist::Zilla::Plugin::CheckStrictVersion" : "0", "Dist::Zilla::Plugin::ConfirmRelease" : "0", "Dist::Zilla::Plugin::CopyFilesFromRelease" : "0", "Dist::Zilla::Plugin::Encoding" : "0", "Dist::Zilla::Plugin::EnsureLatestPerl" : "0", "Dist::Zilla::Plugin::FileFinder::ByName" : "0", "Dist::Zilla::Plugin::GenerateFile::FromShareDir" : "0", "Dist::Zilla::Plugin::Git::Check" : "0", "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch" : "0.004", "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts" : "0", "Dist::Zilla::Plugin::Git::Commit" : "2.020", "Dist::Zilla::Plugin::Git::Contributors" : "0.029", "Dist::Zilla::Plugin::Git::Describe" : "0.004", "Dist::Zilla::Plugin::Git::GatherDir" : "2.016", "Dist::Zilla::Plugin::Git::Push" : "0", "Dist::Zilla::Plugin::Git::Remote::Check" : "0", "Dist::Zilla::Plugin::Git::Tag" : "0", "Dist::Zilla::Plugin::GitHub::Update" : "0.40", "Dist::Zilla::Plugin::GithubMeta" : "0.54", "Dist::Zilla::Plugin::InstallGuide" : "1.200005", "Dist::Zilla::Plugin::Keywords" : "0.004", "Dist::Zilla::Plugin::License" : "5.038", "Dist::Zilla::Plugin::MakeMaker" : "0", "Dist::Zilla::Plugin::Manifest" : "0", "Dist::Zilla::Plugin::MetaConfig" : "0", "Dist::Zilla::Plugin::MetaJSON" : "0", "Dist::Zilla::Plugin::MetaNoIndex" : "0", "Dist::Zilla::Plugin::MetaProvides::Package" : "1.15000002", "Dist::Zilla::Plugin::MetaTests" : "0", "Dist::Zilla::Plugin::MetaYAML" : "0", "Dist::Zilla::Plugin::MinimumPerl" : "1.006", "Dist::Zilla::Plugin::MojibakeTests" : "0.8", "Dist::Zilla::Plugin::NextRelease" : "5.033", "Dist::Zilla::Plugin::PodSyntaxTests" : "5.040", "Dist::Zilla::Plugin::PodWeaver" : "4.005", "Dist::Zilla::Plugin::Prereqs" : "0", "Dist::Zilla::Plugin::Prereqs::AuthorDeps" : "0.006", "Dist::Zilla::Plugin::PromptIfStale" : "0", "Dist::Zilla::Plugin::Readme" : "0", "Dist::Zilla::Plugin::ReadmeAnyFromPod" : "0.142180", "Dist::Zilla::Plugin::RewriteVersion::Transitional" : "0.004", "Dist::Zilla::Plugin::Run::AfterBuild" : "0.041", "Dist::Zilla::Plugin::Run::AfterRelease" : "0.038", "Dist::Zilla::Plugin::RunExtraTests" : "0.024", "Dist::Zilla::Plugin::StaticInstall" : "0.005", "Dist::Zilla::Plugin::Test::CPAN::Changes" : "0.012", "Dist::Zilla::Plugin::Test::ChangesHasContent" : "0", "Dist::Zilla::Plugin::Test::CleanNamespaces" : "0.006", "Dist::Zilla::Plugin::Test::Compile" : "2.039", "Dist::Zilla::Plugin::Test::Kwalitee" : "2.10", "Dist::Zilla::Plugin::Test::MinimumVersion" : "2.000008", "Dist::Zilla::Plugin::Test::Pod::No404s" : "1.003", "Dist::Zilla::Plugin::Test::PodSpelling" : "2.006003", "Dist::Zilla::Plugin::Test::Portability" : "2.000007", "Dist::Zilla::Plugin::Test::ReportPrereqs" : "0.022", "Dist::Zilla::Plugin::TestRelease" : "0", "Dist::Zilla::Plugin::UploadToCPAN" : "0", "Dist::Zilla::Plugin::UseUnsafeInc" : "0", "Dist::Zilla::PluginBundle::Author::ETHER" : "0.119", "Dist::Zilla::PluginBundle::Git::VersionManager" : "0.007", "Software::License::Perl_5" : "0" } } }, "provides" : { "File::Flat" : { "file" : "lib/File/Flat.pm", "version" : "1.05" }, "File::Flat::Object" : { "file" : "lib/File/Flat.pm" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-File-Flat@rt.cpan.org", "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=File-Flat" }, "homepage" : "https://github.com/karenetheridge/File-Flat", "repository" : { "type" : "git", "url" : "https://github.com/karenetheridge/File-Flat.git", "web" : "https://github.com/karenetheridge/File-Flat" } }, "version" : "1.05", "x_Dist_Zilla" : { "perl" : { "version" : "5.029006" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "recommends" } }, "name" : "@Author::ETHER/pluginbundle version", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 0, "check_all_prereqs" : 0, "modules" : [ "Dist::Zilla::PluginBundle::Author::ETHER" ], "phase" : "build", "run_under_travis" : 0, "skip" : [] } }, "name" : "@Author::ETHER/stale modules, build", "version" : "0.055" }, { "class" : "Dist::Zilla::Plugin::FileFinder::ByName", "name" : "@Author::ETHER/Examples", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [], "exclude_match" : [], "follow_symlinks" : 0, "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." }, "Dist::Zilla::Plugin::Git::GatherDir" : { "include_untracked" : 0 } }, "name" : "@Author::ETHER/Git::GatherDir", "version" : "2.045" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Author::ETHER/MetaYAML", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Author::ETHER/MetaJSON", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@Author::ETHER/Readme", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Author::ETHER/Manifest", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@Author::ETHER/License", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::GenerateFile::FromShareDir", "config" : { "Dist::Zilla::Plugin::GenerateFile::FromShareDir" : { "destination_filename" : "CONTRIBUTING", "dist" : "Dist-Zilla-PluginBundle-Author-ETHER", "encoding" : "UTF-8", "has_xs" : 0, "location" : "build", "source_filename" : "CONTRIBUTING" }, "Dist::Zilla::Role::RepoFileInjector" : { "allow_overwrite" : 1, "repo_root" : ".", "version" : "0.009" } }, "name" : "@Author::ETHER/generate CONTRIBUTING", "version" : "0.014" }, { "class" : "Dist::Zilla::Plugin::InstallGuide", "name" : "@Author::ETHER/InstallGuide", "version" : "1.200012" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "bail_out_on_fail" : 1, "fail_on_warning" : "author", "fake_home" : 0, "filename" : "xt/author/00-compile.t", "module_finder" : [ ":InstallModules" ], "needs_display" : 0, "phase" : "develop", "script_finder" : [ ":PerlExecFiles", "@Author::ETHER/Examples" ], "skips" : [], "switch" : [] } }, "name" : "@Author::ETHER/Test::Compile", "version" : "2.058" }, { "class" : "Dist::Zilla::Plugin::MetaTests", "name" : "@Author::ETHER/MetaTests", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", "config" : { "Dist::Zilla::Plugin::Test::CPAN::Changes" : { "changelog" : "Changes" } }, "name" : "@Author::ETHER/Test::CPAN::Changes", "version" : "0.012" }, { "class" : "Dist::Zilla::Plugin::GenerateFile::FromShareDir", "config" : { "Dist::Zilla::Plugin::GenerateFile::FromShareDir" : { "destination_filename" : "xt/author/changes_has_content.t", "dist" : "Dist-Zilla-PluginBundle-Author-ETHER", "encoding" : "UTF-8", "location" : "build", "source_filename" : "changes_has_content.t" }, "Dist::Zilla::Role::RepoFileInjector" : { "allow_overwrite" : 1, "repo_root" : ".", "version" : "0.009" } }, "name" : "@Author::ETHER/generate xt/author/changes_has_content.t", "version" : "0.014" }, { "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent", "name" : "@Author::ETHER/Test::ChangesHasContent", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", "name" : "@Author::ETHER/Test::MinimumVersion", "version" : "2.000008" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@Author::ETHER/PodSyntaxTests", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Test::PodSpelling", "config" : { "Dist::Zilla::Plugin::Test::PodSpelling" : { "directories" : [ "examples", "lib", "script", "t", "xt" ], "spell_cmd" : "", "stopwords" : [ "irc" ], "wordlist" : "Pod::Wordlist" } }, "name" : "@Author::ETHER/Test::PodSpelling", "version" : "2.007005" }, { "class" : "Dist::Zilla::Plugin::Test::Pod::No404s", "name" : "@Author::ETHER/Test::Pod::No404s", "version" : "1.004" }, { "class" : "Dist::Zilla::Plugin::Test::Kwalitee", "config" : { "Dist::Zilla::Plugin::Test::Kwalitee" : { "filename" : "xt/author/kwalitee.t", "skiptest" : [] } }, "name" : "@Author::ETHER/Test::Kwalitee", "version" : "2.12" }, { "class" : "Dist::Zilla::Plugin::MojibakeTests", "name" : "@Author::ETHER/MojibakeTests", "version" : "0.8" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "@Author::ETHER/Test::ReportPrereqs", "version" : "0.027" }, { "class" : "Dist::Zilla::Plugin::Test::Portability", "config" : { "Dist::Zilla::Plugin::Test::Portability" : { "options" : "" } }, "name" : "@Author::ETHER/Test::Portability", "version" : "2.001000" }, { "class" : "Dist::Zilla::Plugin::Test::CleanNamespaces", "config" : { "Dist::Zilla::Plugin::Test::CleanNamespaces" : { "filename" : "xt/author/clean-namespaces.t", "skips" : [] } }, "name" : "@Author::ETHER/Test::CleanNamespaces", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Git::Describe", "name" : "@Author::ETHER/Git::Describe", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "config_plugins" : [ "@Author::ETHER" ], "finder" : [ ":InstallModules", ":ExecFiles" ], "plugins" : [ { "class" : "Pod::Weaver::Plugin::EnsurePod5", "name" : "@Author::ETHER/EnsurePod5", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::H1Nester", "name" : "@Author::ETHER/H1Nester", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::SingleEncoding", "name" : "@Author::ETHER/SingleEncoding", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@Author::ETHER/List", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@Author::ETHER/Verbatim", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::ETHER/header", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Name", "name" : "@Author::ETHER/Name", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Version", "name" : "@Author::ETHER/Version", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::ETHER/prelude", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "SYNOPSIS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "DESCRIPTION", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "OVERVIEW", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "ATTRIBUTES", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "METHODS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "FUNCTIONS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "TYPES", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "@Author::ETHER/Leftovers", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::ETHER/postlude", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::GenerateSection", "name" : "@Author::ETHER/generate SUPPORT", "version" : "1.06" }, { "class" : "Pod::Weaver::Section::AllowOverride", "name" : "@Author::ETHER/allow override SUPPORT", "version" : "0.05" }, { "class" : "Pod::Weaver::Section::Authors", "name" : "@Author::ETHER/Authors", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::AllowOverride", "name" : "@Author::ETHER/allow override AUTHOR", "version" : "0.05" }, { "class" : "Pod::Weaver::Section::Contributors", "name" : "@Author::ETHER/Contributors", "version" : "0.009" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "@Author::ETHER/Legal", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::ETHER/footer", "version" : "4.015" } ] } }, "name" : "@Author::ETHER/PodWeaver", "version" : "4.008" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "@Author::ETHER/GithubMeta", "version" : "0.58" }, { "class" : "Dist::Zilla::Plugin::AutoMetaResources", "name" : "@Author::ETHER/AutoMetaResources", "version" : "1.21" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@Author::ETHER/Authority", "version" : "1.009" }, { "class" : "Dist::Zilla::Plugin::MetaNoIndex", "name" : "@Author::ETHER/MetaNoIndex", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : { "finder" : [ ":InstallModules" ], "finder_objects" : [ { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "6.012" } ], "include_underscores" : 0 }, "Dist::Zilla::Role::MetaProvider::Provider" : { "$Dist::Zilla::Role::MetaProvider::Provider::VERSION" : "2.002004", "inherit_missing" : 0, "inherit_version" : 0, "meta_noindex" : 1 }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000034", "version" : "0.006" } }, "name" : "@Author::ETHER/MetaProvides::Package", "version" : "2.004003" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Author::ETHER/MetaConfig", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Keywords", "config" : { "Dist::Zilla::Plugin::Keywords" : { "keywords" : [] } }, "name" : "@Author::ETHER/Keywords", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::UseUnsafeInc", "config" : { "Dist::Zilla::Plugin::UseUnsafeInc" : { "dot_in_INC" : 0 } }, "name" : "@Author::ETHER/UseUnsafeInc", "version" : "0.001" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@Author::ETHER/AutoPrereqs", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Prereqs::AuthorDeps", "name" : "@Author::ETHER/Prereqs::AuthorDeps", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::MinimumPerl", "name" : "@Author::ETHER/MinimumPerl", "version" : "1.006" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "@Author::ETHER/MakeMaker", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { "git_version" : "2.19.1", "include_authors" : 0, "include_releaser" : 1, "order_by" : "commits", "paths" : [] } }, "name" : "@Author::ETHER/Git::Contributors", "version" : "0.035" }, { "class" : "Dist::Zilla::Plugin::StaticInstall", "config" : { "Dist::Zilla::Plugin::StaticInstall" : { "dry_run" : 1, "mode" : "auto" } }, "name" : "@Author::ETHER/StaticInstall", "version" : "0.012" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "@Author::ETHER/RunExtraTests", "version" : "0.029" }, { "class" : "Dist::Zilla::Plugin::CheckSelfDependency", "config" : { "Dist::Zilla::Plugin::CheckSelfDependency" : { "finder" : [ ":InstallModules" ] }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000034", "version" : "0.006" } }, "name" : "@Author::ETHER/CheckSelfDependency", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::Run::AfterBuild", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "fatal_errors" : 1, "quiet" : 1, "run" : [ "bash -c \"test -e .ackrc && grep -q -- '--ignore-dir=.latest' .ackrc || echo '--ignore-dir=.latest' >> .ackrc; if [[ `dirname '%d'` != .build ]]; then test -e .ackrc && grep -q -- '--ignore-dir=%d' .ackrc || echo '--ignore-dir=%d' >> .ackrc; fi\"" ], "version" : "0.047" } }, "name" : "@Author::ETHER/.ackrc", "version" : "0.047" }, { "class" : "Dist::Zilla::Plugin::Run::AfterBuild", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "eval" : [ "if ('%d' =~ /^%n-[.[:xdigit:]]+$/) { unlink '.latest'; symlink '%d', '.latest'; }" ], "fatal_errors" : 0, "quiet" : 1, "version" : "0.047" } }, "name" : "@Author::ETHER/.latest", "version" : "0.047" }, { "class" : "Dist::Zilla::Plugin::CheckStrictVersion", "name" : "@Author::ETHER/CheckStrictVersion", "version" : "0.001" }, { "class" : "Dist::Zilla::Plugin::CheckMetaResources", "name" : "@Author::ETHER/CheckMetaResources", "version" : "0.001" }, { "class" : "Dist::Zilla::Plugin::EnsureLatestPerl", "config" : { "Dist::Zilla::Plugin::EnsureLatestPerl" : { "Module::CoreList" : "5.20181218" } }, "name" : "@Author::ETHER/EnsureLatestPerl", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 1, "check_all_prereqs" : 1, "modules" : [], "phase" : "release", "run_under_travis" : 0, "skip" : [] } }, "name" : "@Author::ETHER/stale modules, release", "version" : "0.055" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.19.1", "repo_root" : "." } }, "name" : "@Author::ETHER/initial check", "version" : "2.045" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts", "config" : { "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.19.1", "repo_root" : "." } }, "name" : "@Author::ETHER/Git::CheckFor::MergeConflicts", "version" : "0.014" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch", "config" : { "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.19.1", "repo_root" : "." } }, "name" : "@Author::ETHER/Git::CheckFor::CorrectBranch", "version" : "0.014" }, { "class" : "Dist::Zilla::Plugin::Git::Remote::Check", "name" : "@Author::ETHER/Git::Remote::Check", "version" : "0.1.2" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "@Author::ETHER/CheckPrereqsIndexed", "version" : "0.020" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Author::ETHER/TestRelease", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.19.1", "repo_root" : "." } }, "name" : "@Author::ETHER/after tests", "version" : "2.045" }, { "class" : "Dist::Zilla::Plugin::CheckIssues", "name" : "@Author::ETHER/CheckIssues", "version" : "0.010" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Author::ETHER/UploadToCPAN", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromRelease", "config" : { "Dist::Zilla::Plugin::CopyFilesFromRelease" : { "filename" : [ "CONTRIBUTING", "INSTALL", "LICENCE", "LICENSE", "ppport.h" ], "match" : [] } }, "name" : "@Author::ETHER/copy generated files", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "config" : { "Dist::Zilla::Role::FileWatcher" : { "version" : "0.006" } }, "name" : "@Author::ETHER/ReadmeAnyFromPod", "version" : "0.163250" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "recommends" } }, "name" : "@Author::ETHER/@Git::VersionManager/pluginbundle version", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::RewriteVersion::Transitional", "config" : { "Dist::Zilla::Plugin::RewriteVersion" : { "add_tarball_name" : 0, "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 1, "skip_version_provider" : 0 }, "Dist::Zilla::Plugin::RewriteVersion::Transitional" : {} }, "name" : "@Author::ETHER/@Git::VersionManager/RewriteVersion::Transitional", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Update", "name" : "@Author::ETHER/@Git::VersionManager/MetaProvides::Update", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromRelease", "config" : { "Dist::Zilla::Plugin::CopyFilesFromRelease" : { "filename" : [ "Changes" ], "match" : [] } }, "name" : "@Author::ETHER/@Git::VersionManager/CopyFilesFromRelease", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [ "." ], "commit_msg" : "%N-%v%t%n%n%c" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.19.1", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::ETHER/@Git::VersionManager/release snapshot", "version" : "2.045" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 0, "tag" : "v1.05", "tag_format" : "v%v", "tag_message" : "v%v%t" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.19.1", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::ETHER/@Git::VersionManager/Git::Tag", "version" : "2.045" }, { "class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional", "config" : { "Dist::Zilla::Plugin::BumpVersionAfterRelease" : { "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 1, "munge_makefile_pl" : 1 }, "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : {} }, "name" : "@Author::ETHER/@Git::VersionManager/BumpVersionAfterRelease::Transitional", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@Author::ETHER/@Git::VersionManager/NextRelease", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "increment $VERSION after %v release" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Build.PL", "Changes", "Makefile.PL" ], "allow_dirty_match" : [ "(?^:^lib/.*\\.pm$)" ], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.19.1", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::ETHER/@Git::VersionManager/post-release commit", "version" : "2.045" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "x_Dist_Zilla", "type" : "requires" } }, "name" : "@Author::ETHER/@Git::VersionManager/prereqs for @Git::VersionManager", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "origin" ], "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.19.1", "repo_root" : "." } }, "name" : "@Author::ETHER/Git::Push", "version" : "2.045" }, { "class" : "Dist::Zilla::Plugin::GitHub::Update", "config" : { "Dist::Zilla::Plugin::GitHub::Update" : { "metacpan" : 1 } }, "name" : "@Author::ETHER/GitHub::Update", "version" : "0.47" }, { "class" : "Dist::Zilla::Plugin::Run::AfterRelease", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "fatal_errors" : 0, "quiet" : 0, "run" : [ "REDACTED" ], "version" : "0.047" } }, "name" : "@Author::ETHER/install release", "version" : "0.047" }, { "class" : "Dist::Zilla::Plugin::Run::AfterRelease", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "eval" : [ "print \"release complete!\\xa\"" ], "fatal_errors" : 1, "quiet" : 1, "version" : "0.047" } }, "name" : "@Author::ETHER/release complete", "version" : "0.047" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Author::ETHER/ConfirmRelease", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "x_Dist_Zilla", "type" : "requires" } }, "name" : "@Author::ETHER/prereqs for @Author::ETHER", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Encoding", "name" : "Encoding", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::VerifyPhases", "name" : "@Author::ETHER/PHASE VERIFICATION", "version" : "0.016" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : 0 }, "version" : "6.012" } }, "x_authority" : "cpan:ADAMK", "x_contributors" : [ "Adam Kennedy ", "Karen Etheridge " ], "x_generated_by_perl" : "v5.29.6", "x_serialization_backend" : "Cpanel::JSON::XS version 4.08", "x_use_unsafe_inc" : 0 } File-Flat-1.05/META.yml000644 000766 000024 00000061403 13411760707 014740 0ustar00etherstaff000000 000000 --- abstract: 'Implements a flat filesystem' author: - 'Adam Kennedy ' build_requires: ExtUtils::MakeMaker: '0' File::Find: '0' File::Spec: '0' File::Spec::Functions: '0' Test::ClassAPI: '0' Test::More: '0' perl: '5.006' vars: '0' warnings: '0' configure_requires: ExtUtils::MakeMaker: '0' perl: '5.006' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: File-Flat no_index: directory: - t - xt provides: File::Flat: file: lib/File/Flat.pm version: '1.05' File::Flat::Object: file: lib/File/Flat.pm requires: Cwd: '0' File::Copy: '0' File::Copy::Recursive: '0' File::Remove: '0' File::Spec: '0' File::Temp: '0' IO::File: '0' perl: '5.006' prefork: '0' strict: '0' resources: bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=File-Flat homepage: https://github.com/karenetheridge/File-Flat repository: https://github.com/karenetheridge/File-Flat.git version: '1.05' x_Dist_Zilla: perl: version: '5.029006' plugins: - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: recommends name: '@Author::ETHER/pluginbundle version' version: '6.012' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 0 check_all_prereqs: 0 modules: - Dist::Zilla::PluginBundle::Author::ETHER phase: build run_under_travis: 0 skip: [] name: '@Author::ETHER/stale modules, build' version: '0.055' - class: Dist::Zilla::Plugin::FileFinder::ByName name: '@Author::ETHER/Examples' version: '6.012' - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: [] exclude_match: [] follow_symlinks: 0 include_dotfiles: 0 prefix: '' prune_directory: [] root: . Dist::Zilla::Plugin::Git::GatherDir: include_untracked: 0 name: '@Author::ETHER/Git::GatherDir' version: '2.045' - class: Dist::Zilla::Plugin::MetaYAML name: '@Author::ETHER/MetaYAML' version: '6.012' - class: Dist::Zilla::Plugin::MetaJSON name: '@Author::ETHER/MetaJSON' version: '6.012' - class: Dist::Zilla::Plugin::Readme name: '@Author::ETHER/Readme' version: '6.012' - class: Dist::Zilla::Plugin::Manifest name: '@Author::ETHER/Manifest' version: '6.012' - class: Dist::Zilla::Plugin::License name: '@Author::ETHER/License' version: '6.012' - class: Dist::Zilla::Plugin::GenerateFile::FromShareDir config: Dist::Zilla::Plugin::GenerateFile::FromShareDir: destination_filename: CONTRIBUTING dist: Dist-Zilla-PluginBundle-Author-ETHER encoding: UTF-8 has_xs: 0 location: build source_filename: CONTRIBUTING Dist::Zilla::Role::RepoFileInjector: allow_overwrite: 1 repo_root: . version: '0.009' name: '@Author::ETHER/generate CONTRIBUTING' version: '0.014' - class: Dist::Zilla::Plugin::InstallGuide name: '@Author::ETHER/InstallGuide' version: '1.200012' - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: bail_out_on_fail: '1' fail_on_warning: author fake_home: 0 filename: xt/author/00-compile.t module_finder: - ':InstallModules' needs_display: 0 phase: develop script_finder: - ':PerlExecFiles' - '@Author::ETHER/Examples' skips: [] switch: [] name: '@Author::ETHER/Test::Compile' version: '2.058' - class: Dist::Zilla::Plugin::MetaTests name: '@Author::ETHER/MetaTests' version: '6.012' - class: Dist::Zilla::Plugin::Test::CPAN::Changes config: Dist::Zilla::Plugin::Test::CPAN::Changes: changelog: Changes name: '@Author::ETHER/Test::CPAN::Changes' version: '0.012' - class: Dist::Zilla::Plugin::GenerateFile::FromShareDir config: Dist::Zilla::Plugin::GenerateFile::FromShareDir: destination_filename: xt/author/changes_has_content.t dist: Dist-Zilla-PluginBundle-Author-ETHER encoding: UTF-8 location: build source_filename: changes_has_content.t Dist::Zilla::Role::RepoFileInjector: allow_overwrite: 1 repo_root: . version: '0.009' name: '@Author::ETHER/generate xt/author/changes_has_content.t' version: '0.014' - class: Dist::Zilla::Plugin::Test::ChangesHasContent name: '@Author::ETHER/Test::ChangesHasContent' version: '0.011' - class: Dist::Zilla::Plugin::Test::MinimumVersion name: '@Author::ETHER/Test::MinimumVersion' version: '2.000008' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@Author::ETHER/PodSyntaxTests' version: '6.012' - class: Dist::Zilla::Plugin::Test::PodSpelling config: Dist::Zilla::Plugin::Test::PodSpelling: directories: - examples - lib - script - t - xt spell_cmd: '' stopwords: - irc wordlist: Pod::Wordlist name: '@Author::ETHER/Test::PodSpelling' version: '2.007005' - class: Dist::Zilla::Plugin::Test::Pod::No404s name: '@Author::ETHER/Test::Pod::No404s' version: '1.004' - class: Dist::Zilla::Plugin::Test::Kwalitee config: Dist::Zilla::Plugin::Test::Kwalitee: filename: xt/author/kwalitee.t skiptest: [] name: '@Author::ETHER/Test::Kwalitee' version: '2.12' - class: Dist::Zilla::Plugin::MojibakeTests name: '@Author::ETHER/MojibakeTests' version: '0.8' - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: '@Author::ETHER/Test::ReportPrereqs' version: '0.027' - class: Dist::Zilla::Plugin::Test::Portability config: Dist::Zilla::Plugin::Test::Portability: options: '' name: '@Author::ETHER/Test::Portability' version: '2.001000' - class: Dist::Zilla::Plugin::Test::CleanNamespaces config: Dist::Zilla::Plugin::Test::CleanNamespaces: filename: xt/author/clean-namespaces.t skips: [] name: '@Author::ETHER/Test::CleanNamespaces' version: '0.006' - class: Dist::Zilla::Plugin::Git::Describe name: '@Author::ETHER/Git::Describe' version: '0.007' - class: Dist::Zilla::Plugin::PodWeaver config: Dist::Zilla::Plugin::PodWeaver: config_plugins: - '@Author::ETHER' finder: - ':InstallModules' - ':ExecFiles' plugins: - class: Pod::Weaver::Plugin::EnsurePod5 name: '@Author::ETHER/EnsurePod5' version: '4.015' - class: Pod::Weaver::Plugin::H1Nester name: '@Author::ETHER/H1Nester' version: '4.015' - class: Pod::Weaver::Plugin::SingleEncoding name: '@Author::ETHER/SingleEncoding' version: '4.015' - class: Pod::Weaver::Plugin::Transformer name: '@Author::ETHER/List' version: '4.015' - class: Pod::Weaver::Plugin::Transformer name: '@Author::ETHER/Verbatim' version: '4.015' - class: Pod::Weaver::Section::Region name: '@Author::ETHER/header' version: '4.015' - class: Pod::Weaver::Section::Name name: '@Author::ETHER/Name' version: '4.015' - class: Pod::Weaver::Section::Version name: '@Author::ETHER/Version' version: '4.015' - class: Pod::Weaver::Section::Region name: '@Author::ETHER/prelude' version: '4.015' - class: Pod::Weaver::Section::Generic name: SYNOPSIS version: '4.015' - class: Pod::Weaver::Section::Generic name: DESCRIPTION version: '4.015' - class: Pod::Weaver::Section::Generic name: OVERVIEW version: '4.015' - class: Pod::Weaver::Section::Collect name: ATTRIBUTES version: '4.015' - class: Pod::Weaver::Section::Collect name: METHODS version: '4.015' - class: Pod::Weaver::Section::Collect name: FUNCTIONS version: '4.015' - class: Pod::Weaver::Section::Collect name: TYPES version: '4.015' - class: Pod::Weaver::Section::Leftovers name: '@Author::ETHER/Leftovers' version: '4.015' - class: Pod::Weaver::Section::Region name: '@Author::ETHER/postlude' version: '4.015' - class: Pod::Weaver::Section::GenerateSection name: '@Author::ETHER/generate SUPPORT' version: '1.06' - class: Pod::Weaver::Section::AllowOverride name: '@Author::ETHER/allow override SUPPORT' version: '0.05' - class: Pod::Weaver::Section::Authors name: '@Author::ETHER/Authors' version: '4.015' - class: Pod::Weaver::Section::AllowOverride name: '@Author::ETHER/allow override AUTHOR' version: '0.05' - class: Pod::Weaver::Section::Contributors name: '@Author::ETHER/Contributors' version: '0.009' - class: Pod::Weaver::Section::Legal name: '@Author::ETHER/Legal' version: '4.015' - class: Pod::Weaver::Section::Region name: '@Author::ETHER/footer' version: '4.015' name: '@Author::ETHER/PodWeaver' version: '4.008' - class: Dist::Zilla::Plugin::GithubMeta name: '@Author::ETHER/GithubMeta' version: '0.58' - class: Dist::Zilla::Plugin::AutoMetaResources name: '@Author::ETHER/AutoMetaResources' version: '1.21' - class: Dist::Zilla::Plugin::Authority name: '@Author::ETHER/Authority' version: '1.009' - class: Dist::Zilla::Plugin::MetaNoIndex name: '@Author::ETHER/MetaNoIndex' version: '6.012' - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: finder: - ':InstallModules' finder_objects: - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '6.012' include_underscores: 0 Dist::Zilla::Role::MetaProvider::Provider: $Dist::Zilla::Role::MetaProvider::Provider::VERSION: '2.002004' inherit_missing: '0' inherit_version: '0' meta_noindex: '1' Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000034' version: '0.006' name: '@Author::ETHER/MetaProvides::Package' version: '2.004003' - class: Dist::Zilla::Plugin::MetaConfig name: '@Author::ETHER/MetaConfig' version: '6.012' - class: Dist::Zilla::Plugin::Keywords config: Dist::Zilla::Plugin::Keywords: keywords: [] name: '@Author::ETHER/Keywords' version: '0.007' - class: Dist::Zilla::Plugin::UseUnsafeInc config: Dist::Zilla::Plugin::UseUnsafeInc: dot_in_INC: 0 name: '@Author::ETHER/UseUnsafeInc' version: '0.001' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@Author::ETHER/AutoPrereqs' version: '6.012' - class: Dist::Zilla::Plugin::Prereqs::AuthorDeps name: '@Author::ETHER/Prereqs::AuthorDeps' version: '0.006' - class: Dist::Zilla::Plugin::MinimumPerl name: '@Author::ETHER/MinimumPerl' version: '1.006' - class: Dist::Zilla::Plugin::MakeMaker config: Dist::Zilla::Role::TestRunner: default_jobs: 9 name: '@Author::ETHER/MakeMaker' version: '6.012' - class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: git_version: 2.19.1 include_authors: 0 include_releaser: 1 order_by: commits paths: [] name: '@Author::ETHER/Git::Contributors' version: '0.035' - class: Dist::Zilla::Plugin::StaticInstall config: Dist::Zilla::Plugin::StaticInstall: dry_run: 1 mode: auto name: '@Author::ETHER/StaticInstall' version: '0.012' - class: Dist::Zilla::Plugin::RunExtraTests config: Dist::Zilla::Role::TestRunner: default_jobs: 9 name: '@Author::ETHER/RunExtraTests' version: '0.029' - class: Dist::Zilla::Plugin::CheckSelfDependency config: Dist::Zilla::Plugin::CheckSelfDependency: finder: - ':InstallModules' Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000034' version: '0.006' name: '@Author::ETHER/CheckSelfDependency' version: '0.011' - class: Dist::Zilla::Plugin::Run::AfterBuild config: Dist::Zilla::Plugin::Run::Role::Runner: fatal_errors: 1 quiet: 1 run: - "bash -c \"test -e .ackrc && grep -q -- '--ignore-dir=.latest' .ackrc || echo '--ignore-dir=.latest' >> .ackrc; if [[ `dirname '%d'` != .build ]]; then test -e .ackrc && grep -q -- '--ignore-dir=%d' .ackrc || echo '--ignore-dir=%d' >> .ackrc; fi\"" version: '0.047' name: '@Author::ETHER/.ackrc' version: '0.047' - class: Dist::Zilla::Plugin::Run::AfterBuild config: Dist::Zilla::Plugin::Run::Role::Runner: eval: - "if ('%d' =~ /^%n-[.[:xdigit:]]+$/) { unlink '.latest'; symlink '%d', '.latest'; }" fatal_errors: 0 quiet: 1 version: '0.047' name: '@Author::ETHER/.latest' version: '0.047' - class: Dist::Zilla::Plugin::CheckStrictVersion name: '@Author::ETHER/CheckStrictVersion' version: '0.001' - class: Dist::Zilla::Plugin::CheckMetaResources name: '@Author::ETHER/CheckMetaResources' version: '0.001' - class: Dist::Zilla::Plugin::EnsureLatestPerl config: Dist::Zilla::Plugin::EnsureLatestPerl: Module::CoreList: '5.20181218' name: '@Author::ETHER/EnsureLatestPerl' version: '0.008' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 1 check_all_prereqs: 1 modules: [] phase: release run_under_travis: 0 skip: [] name: '@Author::ETHER/stale modules, release' version: '0.055' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: [] allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.19.1 repo_root: . name: '@Author::ETHER/initial check' version: '2.045' - class: Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts config: Dist::Zilla::Role::Git::Repo: git_version: 2.19.1 repo_root: . name: '@Author::ETHER/Git::CheckFor::MergeConflicts' version: '0.014' - class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch config: Dist::Zilla::Role::Git::Repo: git_version: 2.19.1 repo_root: . name: '@Author::ETHER/Git::CheckFor::CorrectBranch' version: '0.014' - class: Dist::Zilla::Plugin::Git::Remote::Check name: '@Author::ETHER/Git::Remote::Check' version: 0.1.2 - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: '@Author::ETHER/CheckPrereqsIndexed' version: '0.020' - class: Dist::Zilla::Plugin::TestRelease name: '@Author::ETHER/TestRelease' version: '6.012' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: [] allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.19.1 repo_root: . name: '@Author::ETHER/after tests' version: '2.045' - class: Dist::Zilla::Plugin::CheckIssues name: '@Author::ETHER/CheckIssues' version: '0.010' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Author::ETHER/UploadToCPAN' version: '6.012' - class: Dist::Zilla::Plugin::CopyFilesFromRelease config: Dist::Zilla::Plugin::CopyFilesFromRelease: filename: - CONTRIBUTING - INSTALL - LICENCE - LICENSE - ppport.h match: [] name: '@Author::ETHER/copy generated files' version: '0.007' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod config: Dist::Zilla::Role::FileWatcher: version: '0.006' name: '@Author::ETHER/ReadmeAnyFromPod' version: '0.163250' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: recommends name: '@Author::ETHER/@Git::VersionManager/pluginbundle version' version: '6.012' - class: Dist::Zilla::Plugin::RewriteVersion::Transitional config: Dist::Zilla::Plugin::RewriteVersion: add_tarball_name: 0 finders: - ':ExecFiles' - ':InstallModules' global: 1 skip_version_provider: 0 Dist::Zilla::Plugin::RewriteVersion::Transitional: {} name: '@Author::ETHER/@Git::VersionManager/RewriteVersion::Transitional' version: '0.009' - class: Dist::Zilla::Plugin::MetaProvides::Update name: '@Author::ETHER/@Git::VersionManager/MetaProvides::Update' version: '0.007' - class: Dist::Zilla::Plugin::CopyFilesFromRelease config: Dist::Zilla::Plugin::CopyFilesFromRelease: filename: - Changes match: [] name: '@Author::ETHER/@Git::VersionManager/CopyFilesFromRelease' version: '0.007' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: - . commit_msg: '%N-%v%t%n%n%c' Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.19.1 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::ETHER/@Git::VersionManager/release snapshot' version: '2.045' - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: 0 tag: v1.05 tag_format: v%v tag_message: v%v%t Dist::Zilla::Role::Git::Repo: git_version: 2.19.1 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::ETHER/@Git::VersionManager/Git::Tag' version: '2.045' - class: Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional config: Dist::Zilla::Plugin::BumpVersionAfterRelease: finders: - ':ExecFiles' - ':InstallModules' global: 1 munge_makefile_pl: 1 Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional: {} name: '@Author::ETHER/@Git::VersionManager/BumpVersionAfterRelease::Transitional' version: '0.009' - class: Dist::Zilla::Plugin::NextRelease name: '@Author::ETHER/@Git::VersionManager/NextRelease' version: '6.012' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: 'increment $VERSION after %v release' Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Build.PL - Changes - Makefile.PL allow_dirty_match: - (?^:^lib/.*\.pm$) changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.19.1 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::ETHER/@Git::VersionManager/post-release commit' version: '2.045' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: x_Dist_Zilla type: requires name: '@Author::ETHER/@Git::VersionManager/prereqs for @Git::VersionManager' version: '6.012' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - origin remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: git_version: 2.19.1 repo_root: . name: '@Author::ETHER/Git::Push' version: '2.045' - class: Dist::Zilla::Plugin::GitHub::Update config: Dist::Zilla::Plugin::GitHub::Update: metacpan: 1 name: '@Author::ETHER/GitHub::Update' version: '0.47' - class: Dist::Zilla::Plugin::Run::AfterRelease config: Dist::Zilla::Plugin::Run::Role::Runner: fatal_errors: 0 quiet: 0 run: - REDACTED version: '0.047' name: '@Author::ETHER/install release' version: '0.047' - class: Dist::Zilla::Plugin::Run::AfterRelease config: Dist::Zilla::Plugin::Run::Role::Runner: eval: - 'print "release complete!\xa"' fatal_errors: 1 quiet: 1 version: '0.047' name: '@Author::ETHER/release complete' version: '0.047' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Author::ETHER/ConfirmRelease' version: '6.012' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: x_Dist_Zilla type: requires name: '@Author::ETHER/prereqs for @Author::ETHER' version: '6.012' - class: Dist::Zilla::Plugin::Encoding name: Encoding version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '6.012' - class: Dist::Zilla::Plugin::VerifyPhases name: '@Author::ETHER/PHASE VERIFICATION' version: '0.016' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '6.012' x_authority: cpan:ADAMK x_contributors: - 'Adam Kennedy ' - 'Karen Etheridge ' x_generated_by_perl: v5.29.6 x_serialization_backend: 'YAML::Tiny version 1.73' x_use_unsafe_inc: 0 File-Flat-1.05/README000644 000766 000024 00000000546 13411760707 014350 0ustar00etherstaff000000 000000 This archive contains the distribution File-Flat, version 1.05: Implements a flat filesystem This software is copyright (c) 2002 by Adam Kennedy. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. This README file was generated by Dist::Zilla::Plugin::Readme v6.012. File-Flat-1.05/t/000700 000766 000024 00000000000 13411760707 013714 5ustar00etherstaff000000 000000 File-Flat-1.05/xt/000700 000766 000024 00000000000 13411760707 014104 5ustar00etherstaff000000 000000 File-Flat-1.05/xt/author/000700 000766 000024 00000000000 13411760707 015406 5ustar00etherstaff000000 000000 File-Flat-1.05/xt/release/000700 000766 000024 00000000000 13411760707 015524 5ustar00etherstaff000000 000000 File-Flat-1.05/xt/release/changes_has_content.t000644 000766 000024 00000002100 13411760707 021711 0ustar00etherstaff000000 000000 use Test::More tests => 2; note 'Checking Changes'; my $changes_file = 'Changes'; my $newver = '1.05'; my $trial_token = '-TRIAL'; my $encoding = 'UTF-8'; SKIP: { ok(-e $changes_file, "$changes_file file exists") or skip 'Changes is missing', 1; ok(_get_changes($newver), "$changes_file has content for $newver"); } done_testing; sub _get_changes { my $newver = shift; # parse changelog to find commit message open(my $fh, '<', $changes_file) or die "cannot open $changes_file: $!"; my $changelog = join('', <$fh>); if ($encoding) { require Encode; $changelog = Encode::decode($encoding, $changelog, Encode::FB_CROAK()); } close $fh; my @content = grep { /^$newver(?:$trial_token)?(?:\s+|$)/ ... /^\S/ } # from newver to un-indented split /\n/, $changelog; shift @content; # drop the version line # drop unindented last line and trailing blank lines pop @content while ( @content && $content[-1] =~ /^(?:\S|\s*$)/ ); # return number of non-blank lines return scalar @content; } File-Flat-1.05/xt/release/cpan-changes.t000644 000766 000024 00000000344 13411760707 020253 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::CPAN::Changes 0.012 use Test::More 0.96 tests => 1; use Test::CPAN::Changes; subtest 'changes_ok' => sub { changes_file_ok('Changes'); }; File-Flat-1.05/xt/release/distmeta.t000644 000766 000024 00000000172 13411760707 017535 0ustar00etherstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::MetaTests. use Test::CPAN::Meta; meta_yaml_ok(); File-Flat-1.05/xt/author/00-compile.t000644 000766 000024 00000002542 13411760707 017455 0ustar00etherstaff000000 000000 use 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.058 use Test::More 0.94; plan tests => 2; my @module_files = ( 'File/Flat.pm' ); # no fake home requested my @switches = ( -d 'blib' ? '-Mblib' : '-Ilib', ); use File::Spec; use IPC::Open3; use IO::Handle; open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my @warnings; for my $lib (@module_files) { # see L my $stderr = IO::Handle->new; diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} } $^X, @switches, '-e', "require q[$lib]")) if $ENV{PERL_COMPILE_TEST_DEBUG}; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { +require blib; blib->VERSION('1.01') }; if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', explain(\@warnings); BAIL_OUT("Compilation problems") if !Test::More->builder->is_passing; File-Flat-1.05/xt/author/changes_has_content.t000644 000766 000024 00000001032 13411760707 021576 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; plan skip_all => 'xt/release/changes_has_content.t is missing' if not -e 'xt/release/changes_has_content.t'; # skip for master branch, only for travis if (($ENV{TRAVIS_PULL_REQUEST} || '') eq 'false') { chomp(my $branch_name = ($ENV{TRAVIS_BRANCH} || `git rev-parse --abbrev-ref HEAD`)); $TODO = 'Changes need not have content for this release yet if this is only the master branch' if ($branch_name || '') eq 'master'; } do './xt/release/changes_has_content.t'; die $@ if $@; File-Flat-1.05/xt/author/clean-namespaces.t000644 000766 000024 00000000361 13411760707 021004 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::CleanNamespaces 0.006 use Test::More 0.94; use Test::CleanNamespaces 0.15; subtest all_namespaces_clean => sub { all_namespaces_clean() }; done_testing; File-Flat-1.05/xt/author/kwalitee.t000644 000766 000024 00000000275 13411760707 017416 0ustar00etherstaff000000 000000 # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.12 use strict; use warnings; use Test::More 0.88; use Test::Kwalitee 1.21 'kwalitee_ok'; kwalitee_ok(); done_testing; File-Flat-1.05/xt/author/minimum-version.t000644 000766 000024 00000000130 13411760707 020735 0ustar00etherstaff000000 000000 #!perl use Test::More; use Test::MinimumVersion; all_minimum_version_ok( qq{5.006} ); File-Flat-1.05/xt/author/mojibake.t000644 000766 000024 00000000151 13411760707 017363 0ustar00etherstaff000000 000000 #!perl use strict; use warnings qw(all); use Test::More; use Test::Mojibake; all_files_encoding_ok(); File-Flat-1.05/xt/author/pod-no404s.t000644 000766 000024 00000000527 13411760707 017420 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; use Test::More; foreach my $env_skip ( qw( SKIP_POD_NO404S AUTOMATED_TESTING ) ){ plan skip_all => "\$ENV{$env_skip} is set, skipping" if $ENV{$env_skip}; } eval "use Test::Pod::No404s"; if ( $@ ) { plan skip_all => 'Test::Pod::No404s required for testing POD'; } else { all_pod_files_ok(); } File-Flat-1.05/xt/author/pod-spell.t000644 000766 000024 00000000465 13411760707 017511 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::PodSpelling 2.007005 use Test::Spelling 0.12; use Pod::Wordlist; add_stopwords(); all_pod_files_spelling_ok( qw( examples lib script t xt ) ); __DATA__ Adam Etheridge File Flat Karen Kennedy adam adamk ether irc lib File-Flat-1.05/xt/author/pod-syntax.t000644 000766 000024 00000000252 13411760707 017712 0ustar00etherstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); File-Flat-1.05/xt/author/portability.t000644 000766 000024 00000000267 13411760707 020154 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; eval 'use Test::Portability::Files'; plan skip_all => 'Test::Portability::Files required for testing portability' if $@; run_tests(); File-Flat-1.05/t/00-report-prereqs.dd000644 000766 000024 00000023210 13411760707 017444 0ustar00etherstaff000000 000000 do { my $x = { 'configure' => { 'requires' => { 'ExtUtils::MakeMaker' => '0', 'perl' => '5.006' } }, 'develop' => { 'recommends' => { 'Dist::Zilla::PluginBundle::Author::ETHER' => '0.145', 'Dist::Zilla::PluginBundle::Git::VersionManager' => '0.007' }, 'requires' => { 'Encode' => '0', 'File::Spec' => '0', 'IO::Handle' => '0', 'IPC::Open3' => '0', 'Pod::Wordlist' => '0', 'Test::CPAN::Changes' => '0.19', 'Test::CPAN::Meta' => '0', 'Test::CleanNamespaces' => '0.15', 'Test::Kwalitee' => '1.21', 'Test::MinimumVersion' => '0', 'Test::Mojibake' => '0', 'Test::More' => '0.96', 'Test::Pod' => '1.41', 'Test::Pod::No404s' => '0', 'Test::Portability::Files' => '0', 'Test::Spelling' => '0.12', 'perl' => '5.006', 'warnings' => '0' } }, 'runtime' => { 'requires' => { 'Cwd' => '0', 'File::Copy' => '0', 'File::Copy::Recursive' => '0', 'File::Remove' => '0', 'File::Spec' => '0', 'File::Temp' => '0', 'IO::File' => '0', 'perl' => '5.006', 'prefork' => '0', 'strict' => '0' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'ExtUtils::MakeMaker' => '0', 'File::Find' => '0', 'File::Spec' => '0', 'File::Spec::Functions' => '0', 'Test::ClassAPI' => '0', 'Test::More' => '0', 'perl' => '5.006', 'vars' => '0', 'warnings' => '0' } }, 'x_Dist_Zilla' => { 'requires' => { 'Dist::Zilla' => '5', 'Dist::Zilla::Plugin::Authority' => '1.009', 'Dist::Zilla::Plugin::AutoMetaResources' => '0', 'Dist::Zilla::Plugin::AutoPrereqs' => '5.038', 'Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional' => '0.004', 'Dist::Zilla::Plugin::CheckIssues' => '0', 'Dist::Zilla::Plugin::CheckMetaResources' => '0', 'Dist::Zilla::Plugin::CheckPrereqsIndexed' => '0.019', 'Dist::Zilla::Plugin::CheckSelfDependency' => '0', 'Dist::Zilla::Plugin::CheckStrictVersion' => '0', 'Dist::Zilla::Plugin::ConfirmRelease' => '0', 'Dist::Zilla::Plugin::CopyFilesFromRelease' => '0', 'Dist::Zilla::Plugin::Encoding' => '0', 'Dist::Zilla::Plugin::EnsureLatestPerl' => '0', 'Dist::Zilla::Plugin::FileFinder::ByName' => '0', 'Dist::Zilla::Plugin::GenerateFile::FromShareDir' => '0', 'Dist::Zilla::Plugin::Git::Check' => '0', 'Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch' => '0.004', 'Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts' => '0', 'Dist::Zilla::Plugin::Git::Commit' => '2.020', 'Dist::Zilla::Plugin::Git::Contributors' => '0.029', 'Dist::Zilla::Plugin::Git::Describe' => '0.004', 'Dist::Zilla::Plugin::Git::GatherDir' => '2.016', 'Dist::Zilla::Plugin::Git::Push' => '0', 'Dist::Zilla::Plugin::Git::Remote::Check' => '0', 'Dist::Zilla::Plugin::Git::Tag' => '0', 'Dist::Zilla::Plugin::GitHub::Update' => '0.40', 'Dist::Zilla::Plugin::GithubMeta' => '0.54', 'Dist::Zilla::Plugin::InstallGuide' => '1.200005', 'Dist::Zilla::Plugin::Keywords' => '0.004', 'Dist::Zilla::Plugin::License' => '5.038', 'Dist::Zilla::Plugin::MakeMaker' => '0', 'Dist::Zilla::Plugin::Manifest' => '0', 'Dist::Zilla::Plugin::MetaConfig' => '0', 'Dist::Zilla::Plugin::MetaJSON' => '0', 'Dist::Zilla::Plugin::MetaNoIndex' => '0', 'Dist::Zilla::Plugin::MetaProvides::Package' => '1.15000002', 'Dist::Zilla::Plugin::MetaTests' => '0', 'Dist::Zilla::Plugin::MetaYAML' => '0', 'Dist::Zilla::Plugin::MinimumPerl' => '1.006', 'Dist::Zilla::Plugin::MojibakeTests' => '0.8', 'Dist::Zilla::Plugin::NextRelease' => '5.033', 'Dist::Zilla::Plugin::PodSyntaxTests' => '5.040', 'Dist::Zilla::Plugin::PodWeaver' => '4.005', 'Dist::Zilla::Plugin::Prereqs' => '0', 'Dist::Zilla::Plugin::Prereqs::AuthorDeps' => '0.006', 'Dist::Zilla::Plugin::PromptIfStale' => '0', 'Dist::Zilla::Plugin::Readme' => '0', 'Dist::Zilla::Plugin::ReadmeAnyFromPod' => '0.142180', 'Dist::Zilla::Plugin::RewriteVersion::Transitional' => '0.004', 'Dist::Zilla::Plugin::Run::AfterBuild' => '0.041', 'Dist::Zilla::Plugin::Run::AfterRelease' => '0.038', 'Dist::Zilla::Plugin::RunExtraTests' => '0.024', 'Dist::Zilla::Plugin::StaticInstall' => '0.005', 'Dist::Zilla::Plugin::Test::CPAN::Changes' => '0.012', 'Dist::Zilla::Plugin::Test::ChangesHasContent' => '0', 'Dist::Zilla::Plugin::Test::CleanNamespaces' => '0.006', 'Dist::Zilla::Plugin::Test::Compile' => '2.039', 'Dist::Zilla::Plugin::Test::Kwalitee' => '2.10', 'Dist::Zilla::Plugin::Test::MinimumVersion' => '2.000008', 'Dist::Zilla::Plugin::Test::Pod::No404s' => '1.003', 'Dist::Zilla::Plugin::Test::PodSpelling' => '2.006003', 'Dist::Zilla::Plugin::Test::Portability' => '2.000007', 'Dist::Zilla::Plugin::Test::ReportPrereqs' => '0.022', 'Dist::Zilla::Plugin::TestRelease' => '0', 'Dist::Zilla::Plugin::UploadToCPAN' => '0', 'Dist::Zilla::Plugin::UseUnsafeInc' => '0', 'Dist::Zilla::PluginBundle::Author::ETHER' => '0.119', 'Dist::Zilla::PluginBundle::Git::VersionManager' => '0.007', 'Software::License::Perl_5' => '0' } } }; $x; }File-Flat-1.05/t/00-report-prereqs.t000644 000766 000024 00000013545 13411760707 017332 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.027 use Test::More tests => 1; use ExtUtils::MakeMaker; use File::Spec; # from $version::LAX my $lax_version_re = qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | (?:\.[0-9]+) (?:_[0-9]+)? ) | (?: v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? ) )/x; # hide optional CPAN::Meta modules from prereq scanner # and check if they are available my $cpan_meta = "CPAN::Meta"; my $cpan_meta_pre = "CPAN::Meta::Prereqs"; my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic # Verify requirements? my $DO_VERIFY_PREREQS = 1; sub _max { my $max = shift; $max = ( $_ > $max ) ? $_ : $max for @_; return $max; } sub _merge_prereqs { my ($collector, $prereqs) = @_; # CPAN::Meta::Prereqs object if (ref $collector eq $cpan_meta_pre) { return $collector->with_merged_prereqs( CPAN::Meta::Prereqs->new( $prereqs ) ); } # Raw hashrefs for my $phase ( keys %$prereqs ) { for my $type ( keys %{ $prereqs->{$phase} } ) { for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; } } } return $collector; } my @include = qw( Encode File::Temp JSON::PP Module::Runtime Sub::Name YAML autodie ); my @exclude = qw( ); # Add static prereqs to the included modules list my $static_prereqs = do './t/00-report-prereqs.dd'; # Merge all prereqs (either with ::Prereqs or a hashref) my $full_prereqs = _merge_prereqs( ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), $static_prereqs ); # Add dynamic prereqs to the included modules list (if we can) my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; my $cpan_meta_error; if ( $source && $HAS_CPAN_META && (my $meta = eval { CPAN::Meta->load_file($source) } ) ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } else { $cpan_meta_error = $@; # capture error from CPAN::Meta->load_file($source) $source = 'static metadata'; } my @full_reports; my @dep_errors; my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; # Add static includes into a fake section for my $mod (@include) { $req_hash->{other}{modules}{$mod} = 0; } for my $phase ( qw(configure build test runtime develop other) ) { next unless $req_hash->{$phase}; next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); for my $type ( qw(requires recommends suggests conflicts modules) ) { next unless $req_hash->{$phase}{$type}; my $title = ucfirst($phase).' '.ucfirst($type); my @reports = [qw/Module Want Have/]; for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { next if $mod eq 'perl'; next if grep { $_ eq $mod } @exclude; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; my $want = $req_hash->{$phase}{$type}{$mod}; $want = "undef" unless defined $want; $want = "any" if !$want && $want == 0; my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; if ($prefix) { my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); $have = "undef" unless defined $have; push @reports, [$mod, $want, $have]; if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { if ( $have !~ /\A$lax_version_re\z/ ) { push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; } elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { push @dep_errors, "$mod version '$have' is not in required range '$want'"; } } } else { push @reports, [$mod, $want, "missing"]; if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { push @dep_errors, "$mod is not installed ($req_string)"; } } } if ( @reports ) { push @full_reports, "=== $title ===\n\n"; my $ml = _max( map { length $_->[0] } @reports ); my $wl = _max( map { length $_->[1] } @reports ); my $hl = _max( map { length $_->[2] } @reports ); if ($type eq 'modules') { splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; } else { splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; } push @full_reports, "\n"; } } } if ( @full_reports ) { diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; } if ( $cpan_meta_error || @dep_errors ) { diag "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n"; } if ( $cpan_meta_error ) { my ($orig_source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; diag "\nCPAN::Meta->load_file('$orig_source') failed with: $cpan_meta_error\n"; } if ( @dep_errors ) { diag join("\n", "\nThe following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass; # vim: ts=4 sts=4 sw=4 et: File-Flat-1.05/t/01_compile.t000600 000766 000024 00000000242 13411760707 016031 0ustar00etherstaff000000 000000 #!/usr/bin/perl use strict; BEGIN { $| = 1; $^W = 1; } use Test::More tests => 2; ok( $] >= 5.005, 'Perl version is new enough' ); use_ok( 'File::Flat' ); File-Flat-1.05/t/02_api.t000600 000766 000024 00000001547 13411760707 015164 0ustar00etherstaff000000 000000 #!/usr/bin/perl # Basic first pass API testing for File::Flat use strict; BEGIN { $| = 1; $^W = 1; } # Execute the tests use Test::More 'tests' => 63; use File::Flat; # Execute the tests use Test::ClassAPI; Test::ClassAPI->execute('complete'); exit(0); # Define the API __DATA__ File::Flat=class File::Flat::Object=class [File::Flat] exists=method isaFile=method isaDirectory=method canRead=method canWrite=method canReadWrite=method canExecute=method canOpen=method canRemove=method isText=method isBinary=method fileSize=method open=method getReadHandle=method getWriteHandle=method getAppendHandle=method getReadWriteHandle=method slurp=method read=method write=method overwrite=method append=method truncate=method copy=method move=method remove=method prune=method makeDirectory=method errstr=method [File::Flat::Object] File::Flat=implements new=method File-Flat-1.05/t/03_main.t000600 000766 000024 00000106216 13411760707 015337 0ustar00etherstaff000000 000000 #!/usr/bin/perl # Formal testing for File::Flat use strict; use File::Spec::Functions ':ALL'; BEGIN { $| = 1; $^W = 1; } use File::Copy 'copy'; use File::Remove 'remove'; use File::Find 'find'; # If we are root, some things we WANT to fail won't, # and we'll have to skip some tests. use vars qw{$root $win32}; BEGIN { $root = ($> == 0) ? 1 : 0; $win32 = ($^O eq 'MSWin32') ? 1 : 0; } # cygwin permissions are insane, so lets treat everyone like # root and skip all the relevant tests. # we ALSO want to skip all the tests (mostly related to canExecute) # that fail on Win32. BEGIN { if ( $^O eq 'cygwin' ) { $root = 1; $win32 = 1; } } use Test::More tests => 269; # Set up any needed globals use vars qw{$loaded $ci $bad}; use vars qw{$content_string @content_array $content_length}; use vars qw{$curdir %f}; BEGIN { $loaded = 0; $| = 1; $content_string = "one\ntwo\nthree\n\n"; @content_array = ( 'one', 'two', 'three', '' ); $content_length = length $content_string; # Define all the paths we are going to need in advance $curdir = curdir(); %f = ( null => catfile( $curdir, 'null' ), something => catfile( $curdir, 'something' ), rwx => catfile( $curdir, '0000' ), Rwx => catfile( $curdir, '0400' ), rWx => catfile( $curdir, '0200' ), rwX => catfile( $curdir, '0100' ), RWx => catfile( $curdir, '0600' ), RwX => catfile( $curdir, '0500' ), rWX => catfile( $curdir, '0300' ), RWX => catfile( $curdir, '0700' ), gooddir => catdir( $curdir, 'gooddir' ), baddir => catdir( $curdir, 'baddir' ), ff_handle => catfile( $curdir, 't', 'ff_handle' ), ff_binary => catfile( $curdir, 't', 'ff_binary' ), ff_text => catfile( $curdir, 't', 'ff_text' ), ff_content => catfile( $curdir, 't', 'ff_content' ), ff_content2 => catfile( $curdir, 'ff_content2' ), a_ff_text3 => catfile( $curdir, 'a', 'ff_text3' ), abcde_ff_text3 => catfile( $curdir, 'a', 'b', 'c', 'd', 'e', 'ff_text3' ), abdde_ff_text3 => catfile( $curdir, 'a', 'b', 'd', 'd', 'e', 'ff_text3' ), abc => catdir( $curdir, 'a', 'b', 'c' ), abd => catdir( $curdir, 'a', 'b', 'd' ), a => catdir( $curdir, 'a' ), b => catdir( $curdir, 'b' ), moved_1 => catfile( $curdir, 'moved_1' ), moved_2 => catfile( $curdir, 'b', 'c', 'd', 'e', 'moved_2' ), write_1 => catfile( $curdir, 'write_1' ), write_2 => catfile( $curdir, 'write_2' ), write_3 => catfile( $curdir, 'write_3' ), write_4 => catfile( $curdir, 'write_4' ), write_5 => catfile( $curdir, 'write_5' ), write_6 => catfile( $curdir, 'write_6' ), over_1 => catfile( $curdir, 'over_1' ), over_2 => catfile( $curdir, 'over_2' ), over_3 => catfile( $curdir, 'over_3' ), over_4 => catfile( $curdir, 'over_4' ), append_1 => catfile( $curdir, 'append_1' ), append_2 => catfile( $curdir, 'append_2' ), append_3 => catfile( $curdir, 'append_3' ), append_4 => catfile( $curdir, 'append_4' ), size_1 => catfile( $curdir, 'size_1' ), size_2 => catfile( $curdir, 'size_2' ), size_3 => catfile( $curdir, 'size_3' ), trunc_1 => catfile( $curdir, 'trunc_1' ), prune => catdir( $curdir, 'prunedir' ), prune_1 => catdir( $curdir, 'prunedir', 'single' ), prune_2 => catdir( $curdir, 'prunedir', 'multiple', 'lots', 'of', 'dirs' ), prune_2a => catdir( $curdir, 'prunedir', 'multiple' ), prune_3 => catdir( $curdir, 'prunedir', 'onlyone', 'thisone' ), prune_4 => catdir( $curdir, 'prunedir', 'onlyone', 'notthis' ), prune_4a => catdir( $curdir, 'prunedir', 'onlyone' ), prune_5 => catdir( $curdir, 'prunedir', 'onlyone', 'notthis', 'orthis' ), remove_prune_1 => catfile( $curdir, 'prunedir', 'remove', 'prune_1' ), remove_prune_2 => catfile( $curdir, 'prunedir', 'remove', 'prune_2' ), remove_prune_3 => catfile( $curdir, 'prunedir', 'remove', 'prune_3' ), remove_prune_4 => catfile( $curdir, 'prunedir', 'remove', 'prune_4' ), remove_prune_5 => catfile( $curdir, 'prunedir', 'remove', 'prune_5' ), remove_prune_6 => catfile( $curdir, 'prunedir', 'remove', 'prune_6' ), ); # Avoid some 'only used once' warnings $File::Flat::errstr = $File::Flat::errstr; $File::Flat::AUTO_PRUNE = $File::Flat::AUTO_PRUNE; } # Convenience functions to avoid system calls sub touch_test_file($) { # Do the 'touch' part my $file = catfile( $curdir, $_[0] ); open FILE, ">>$file" or return undef; close FILE; # And now the chmod part my $mask = oct($_[0]); chmod $mask, $file or return undef; 1; } sub chmod_R($$) { my($mask, $dir) = @_; chmod $mask, $dir; find( sub { chmod $mask, $File::Find::name }, $dir ); } # Check their perl version, and that modules are installed ok( $] >= 5.005, "Your perl is new enough" ); use_ok( 'File::Flat' ); # Check for the three files that should already exist ok( -f $f{ff_text}, 'ff_text exists' ); ok( -f $f{ff_binary}, 'ff_binary exists' ); ok( -f $f{ff_content}, 'ff_content exists' ); # Create the files for the file test section touch_test_file('0000') or die "Failed to create file we can do anything to"; touch_test_file('0400') or die "Failed to create file we can only read"; touch_test_file('0200') or die "Failed to create file we can only write"; touch_test_file('0100') or die "Failed to create file we can only execute"; touch_test_file('0600') or die "Failed to create file we can read and write"; touch_test_file('0500') or die "Failed to create file we can read and execute"; touch_test_file('0300') or die "Failed to create file we can write and execute"; touch_test_file('0700') or die "Failed to create file we can read, write and execute"; unless ( chmod 0777, $curdir ) { die "Failed to set current directory to mode 777"; } unless ( -e $f{gooddir} ) { unless ( mkdir $f{gooddir}, 0755 ) { die "Failed to create mode 0755 directory"; } } unless ( -e $f{baddir} ) { unless ( mkdir $f{baddir}, 0000 ) { die "Failed to create mode 0000 directory"; } } # We are also going to use a file called "./null" to represent # a file that doesn't exist. ### Test Section 1 # Here we will test all the static methods that are handled directly, and # not passed on to the object form of the methods. # Test the error message handling my $error_message = 'foo'; my $rv = File::Flat->_error( $error_message ); ok( ! defined $rv, "->_error returns undef" ); ok( $File::Flat::errstr eq $error_message, "->_error sets error message" ); ok( File::Flat->errstr eq $error_message, "->errstr retrieves error message" ); # Test the static ->exists method ok( ! File::Flat->exists( $f{null} ), "Static ->exists doesn't see missing file" ); ok( File::Flat->exists( $f{rwx} ), "Static ->exists sees mode 000 file" ); ok( File::Flat->exists( $f{Rwx} ), "Static ->exists sees mode 400 file" ); ok( File::Flat->exists( $f{RWX} ), "Static ->exists sees mode 700 file" ); ok( File::Flat->exists( $curdir ), "Static ->exists sees . directory" ); ok( File::Flat->exists( $f{baddir} ), "Static ->exists sees mode 000 directory" ); # Test the static ->isaFile method ok( ! File::Flat->isaFile( $f{null} ), "Static ->isaFile returns false for missing file" ); ok( File::Flat->isaFile( $f{rwx} ), "Static ->isaFile returns true for mode 000 file" ); ok( File::Flat->isaFile( $f{RWX} ), "Static ->isaFile returns true for mode 700 file" ); ok( ! File::Flat->isaFile( $curdir ), "Static ->isaFile returns false for current directory" ); ok( ! File::Flat->isaFile( $f{gooddir} ), "Static ->isaFile returns false for subdirectory" ); # Test the static ->isaDirectory method ok( ! File::Flat->isaDirectory( $f{null} ), "Static ->isaDirectory returns false for missing directory" ); ok( ! File::Flat->isaDirectory( $f{rwx} ), "Static ->isaDirectory returns false for mode 000 file" ); ok( ! File::Flat->isaDirectory( $f{RWX} ), "Static ->isaDirectory returns false for mode 700 file" ); ok( File::Flat->isaDirectory( $curdir ), "Static ->isaDirectory returns true for current directory" ); ok( File::Flat->isaDirectory( $f{gooddir} ), "Static ->isaDirectory returns true for readable subdirectory" ); ok( File::Flat->isaDirectory( $f{baddir} ), "Static ->isaDirectory return true for unreadable subdirectory" ); # Test the static ->canRead method ok( ! File::Flat->canRead( $f{null} ), "Static ->canRead returns false for missing file" ); SKIP: { skip "Skipping tests known to fail for root", 1 if $root; ok( ! File::Flat->canRead( $f{rwx} ), "Static ->canRead returns false for mode 000 file" ); } ok( File::Flat->canRead( $f{Rwx} ), "Static ->canRead returns true for mode 400 file" ); SKIP: { skip "Skipping tests known to fail for root", 2 if $root; ok( ! File::Flat->canRead( $f{rWx} ), "Static ->canRead returns false for mode 200 file" ); ok( ! File::Flat->canRead( $f{rwX} ), "Static ->canRead returns false for mode 100 file" ); } ok( File::Flat->canRead( $f{RWx} ), "Static ->canRead returns true for mode 500 file" ); ok( File::Flat->canRead( $f{RwX} ), "Static ->canRead returns true for mode 300 file" ); ok( File::Flat->canRead( $f{RWX} ), "Static ->canRead returns true for mode 700 file" ); ok( File::Flat->canRead( $curdir ), "Static ->canRead returns true for current directory" ); ok( File::Flat->canRead( $f{gooddir} ), "Static ->canRead returns true for readable subdirectory" ); SKIP: { skip "Skipping tests known to fail for root", 1 if $root; ok( ! File::Flat->canRead( $f{baddir} ), "Static ->canRead returns false for unreadable subdirectory" ); } # Test the static ->canWrite method ok( File::Flat->canWrite( $f{null} ), "Static ->canWrite returns true for missing, creatable, file" ); SKIP: { skip "Skipping tests known to fail for root", 2 if $root; ok( ! File::Flat->canWrite( $f{rwx} ), "Static ->canWrite returns false for mode 000 file" ); ok( ! File::Flat->canWrite( $f{Rwx} ), "Static ->canWrite returns false for mode 400 file" ); } ok( File::Flat->canWrite( $f{rWx} ), "Static ->canWrite returns true for mode 200 file" ); SKIP: { skip "Skipping tests known to fail for root", 1 if $root; ok( ! File::Flat->canWrite( $f{rwX} ), "Static ->canWrite returns false for mode 100 file" ); } ok( File::Flat->canWrite( $f{RWx} ), "Static ->canWrite returns true for mode 500 file" ); SKIP: { skip "Skipping tests known to fail for root", 1 if $root; ok( ! File::Flat->canWrite( $f{RwX} ), "Static ->canWrite returns false for mode 300 file" ); } ok( File::Flat->canWrite( $f{RWX} ), "Static ->canWrite returns true for mode 700 file" ); ok( File::Flat->canWrite( $curdir ), "Static ->canWrite returns true for current directory" ); ok( File::Flat->canWrite( $f{gooddir} ), "Static ->canWrite returns true for writable subdirectory" ); SKIP: { skip "Skipping tests known to fail for root", 2 if $root; ok( ! File::Flat->canWrite( $f{baddir} ), "Static ->canWrite returns false for unwritable subdirectory" ); ok( ! File::Flat->canWrite( catfile($f{baddir}, 'file') ), "Static ->canWrite returns false for missing, non-creatable file" ); } # Test the static ->canReadWrite method ok( ! File::Flat->canReadWrite( $f{null} ), "Static ->canReadWrite returns false for missing file" ); SKIP: { skip "Skipping tests known to fail for root", 4 if $root; ok( ! File::Flat->canReadWrite( $f{rwx} ), "Static ->canReadWrite returns false for mode 000 file" ); ok( ! File::Flat->canReadWrite( $f{Rwx} ), "Static ->canReadWrite returns false for mode 400 file" ); ok( ! File::Flat->canReadWrite( $f{rWx} ), "Static ->canReadWrite returns false for mode 200 file" ); ok( ! File::Flat->canReadWrite( $f{rwX} ), "Static ->canReadWrite returns false for mode 100 file" ); } ok( File::Flat->canReadWrite( $f{RWx} ), "Static ->canReadWrite returns true for mode 500 file" ); SKIP: { skip "Skipping tests known to fail for root", 1 if $root; ok( ! File::Flat->canReadWrite( $f{RwX} ), "Static ->canReadWrite returns false for mode 300 file" ); } ok( File::Flat->canReadWrite( $f{RWX} ), "Static ->canReadWrite returns true for mode 700 file" ); ok( File::Flat->canReadWrite( $curdir ), "Static ->canReadWrite returns true for current directory" ); ok( File::Flat->canReadWrite( $f{gooddir} ), "Static ->canReadWrite returns true for readwritable subdirectory" ); SKIP: { skip "Skipping tests known to fail for root", 1 if $root; ok( ! File::Flat->canReadWrite( $f{baddir} ), "Static ->canReadWrite returns false for unreadwritable subdirectory" ); } # Test the static ->canExecute method SKIP: { skip( "Skipping tests known to falsely fail on Win32", 11 ) if $win32; ok( ! File::Flat->canExecute( $f{null} ), "Static ->canExecute returns false for missing file" ); ok( ! File::Flat->canExecute( $f{rwx} ), "Static ->canExecute returns false for mode 000 file" ); ok( ! File::Flat->canExecute( $f{Rwx} ), "Static ->canExecute returns false for mode 400 file" ); ok( ! File::Flat->canExecute( $f{rWx} ), "Static ->canExecute returns false for mode 200 file" ); ok( File::Flat->canExecute( $f{rwX} ), "Static ->canExecute returns true for mode 100 file" ); ok( ! File::Flat->canExecute( $f{RWx} ), "Static ->canExecute returns false for mode 500 file" ); ok( File::Flat->canExecute( $f{RwX} ), "Static ->canExecute returns true for mode 300 file" ); ok( File::Flat->canExecute( $f{RWX} ), "Static ->canExecute returns true for mode 700 file" ); ok( File::Flat->canExecute( $curdir ), "Static ->canExecute returns true for current directory" ); ok( File::Flat->canExecute( $f{gooddir} ), "Static ->canExecute returns true for executable subdirectory" ); skip( "Skipping tests known to falsely fail for root", 1 ) if $root; ok( ! File::Flat->canExecute( $f{baddir} ), "Static ->canExecute returns false for unexecutable subdirectory" ); } # Test the static ->canOpen method ok( ! File::Flat->canOpen( $f{null} ), "Static ->canOpen returns false for missing file" ); SKIP: { skip "Skipping tests known to fail for root", 1 if $root; ok( ! File::Flat->canOpen( $f{rwx} ), "Static ->canOpen returns false for mode 000 file" ); } ok( File::Flat->canOpen( $f{Rwx} ), "Static ->canOpen returns true for mode 400 file" ); SKIP: { skip "Skipping tests known to fail for root", 2 if $root; ok( ! File::Flat->canOpen( $f{rWx} ), "Static ->canOpen returns false for mode 200 file" ); ok( ! File::Flat->canOpen( $f{rwX} ), "Static ->canOpen returns false for mode 100 file" ); } ok( File::Flat->canOpen( $f{RWx} ), "Static ->canOpen returns true for mode 500 file" ); ok( File::Flat->canOpen( $f{RwX} ), "Static ->canOpen returns true for mode 300 file" ); ok( File::Flat->canOpen( $f{RWX} ), "Static ->canOpen returns true for mode 700 file" ); ok( ! File::Flat->canOpen( $curdir ), "Static ->canOpen returns false for current directory" ); ok( ! File::Flat->canOpen( $f{gooddir} ), "Static ->canOpen returns false for readable subdirectory" ); ok( ! File::Flat->canOpen( $f{baddir} ), "Static ->canOpen returns false for unreadable subdirectory" ); # Test the existence of normal and/or binary files ok( ! File::Flat->isText( $f{null} ), "Static ->isText returns false for missing file" ); ok( ! File::Flat->isText( $f{ff_binary} ), "Static ->isText returns false for binary file" ); ok( File::Flat->isText( $f{ff_text} ), "Static ->isText returns true for text file" ); ok( ! File::Flat->isText( $f{gooddir} ), "Static ->isText returns false for good subdirectory" ); ok( ! File::Flat->isText( $f{baddir} ), "Static ->isText returns false for bad subdirectory" ); ok( ! File::Flat->isBinary( $f{null} ), "Static ->isBinary returns false for missing file" ); ok( File::Flat->isBinary( $f{ff_binary} ), "Static ->isBinary returns true for binary file" ); ok( ! File::Flat->isBinary( $f{ff_text} ), "Static ->isBinary returns false for text file" ); ok( ! File::Flat->isBinary( $f{gooddir} ), "Static ->isBinary return false for good subdirectory" ); ok( ! File::Flat->isBinary( $f{baddir} ), "Static ->isBinary returns false for bad subdirectory" ); my %handle = (); # Do open handle methods return false for bad values $handle{generic} = File::Flat->open( $f{null} ); $handle{readhandle} = File::Flat->open( $f{null} ); $handle{writehandle} = File::Flat->open( $f{null} ); $handle{appendhandle} = File::Flat->open( $f{null} ); $handle{readwritehandle} = File::Flat->open( $f{null} ); ok( ! defined $handle{generic}, "Static ->open call returns undef on bad file name" ); ok( ! defined $handle{readhandle}, "Static ->getReadHandle returns undef on bad file name" ); ok( ! defined $handle{writehandle}, "Static ->getWriteHandle returns undef on bad file name" ); ok( ! defined $handle{appendhandle}, "Static ->getAppendHandle returns undef on bad file name" ); ok( ! defined $handle{readwritehandle}, "Static ->getReadWriteHandle returns undef on bad file name" ); # Do the open methods at least return a file handle copy( $f{ff_text}, $f{ff_handle} ) or die "Failed to copy file in preperation for test"; $handle{generic} = File::Flat->open( $f{ff_handle} ); $handle{readhandle} = File::Flat->getReadHandle( $f{ff_handle} ); $handle{writehandle} = File::Flat->getWriteHandle( $f{ff_handle} ); $handle{appendhandle} = File::Flat->getAppendHandle( $f{ff_handle} ); $handle{readwritehandle} = File::Flat->getReadWriteHandle( $f{ff_handle} ); isa_ok( $handle{generic}, 'IO::File' ); # Static ->open call returns IO::File object isa_ok( $handle{readhandle}, 'IO::File' ); # Static ->getReadHandle returns IO::File object isa_ok( $handle{writehandle}, 'IO::File' ); # Static ->getWriteHandle returns IO::File object isa_ok( $handle{appendhandle}, 'IO::File' ); # Static ->getAppendHandle returns IO::File object isa_ok( $handle{readwritehandle}, 'IO::File' ); # Static ->getReadWriteHandle returns IO::File object # Test the static ->copy method ok( ! defined File::Flat->copy(), '->copy() returns error' ); ok( ! defined File::Flat->copy( $f{ff_content} ), '->copy( file ) returns error' ); $rv = File::Flat->copy( $f{ff_content}, $f{ff_content2} ); ok( $rv, "Static ->copy returns true correctly for same directory copy" ); ok( -e $f{ff_content2}, "Static ->copy actually created the file for same directory copy" ); ok( check_content_file( $f{ff_content2} ), "Static ->copy copies the file without breaking it" ); $rv = File::Flat->copy( $f{ff_text}, $f{a_ff_text3} ); ok( $rv, "Static ->copy returns true correctly for single sub-directory copy" ); ok( -e $f{a_ff_text3}, "Static ->copy actually created the file for single sub-directory copy" ); $rv = File::Flat->copy( $f{ff_text}, $f{abcde_ff_text3} ); ok( $rv, "Static ->copy returns true correctly for multiple sub-directory copy" ); ok( -e $f{abcde_ff_text3}, "Static ->copy actually created the file for multiple sub-directory copy" ); $rv = File::Flat->copy( $f{null}, $f{something} ); ok( ! $rv, "Static ->copy return undef when file does not exist" ); # Directory copying $rv = File::Flat->copy( $f{abc}, $f{abd} ); SKIP: { skip "Skipping tests known to fail for root", 1 if $root; ok( $rv, '->copy( dir, dir ) returns true' ); } ok( -d $f{abd}, '->copy( dir, dir ): New dir exists' ); ok( -f $f{abdde_ff_text3}, '->copy( dir, dir ): Files within directory were copied' ); # Test the static ->move method $rv = File::Flat->move( $f{abcde_ff_text3}, $f{moved_1} ); ok( $rv, "Static ->move for move to existing directory returns true " ); ok( ! -e $f{abcde_ff_text3}, "Static ->move for move to existing directory actually removes the old file" ); ok( -e $f{moved_1}, "Static ->move for move to existing directory actually creates the new file" ); $rv = File::Flat->move( $f{ff_content2}, $f{moved_2} ); ok( $rv, "Static ->move for move to new directory returns true " ); ok( ! -e $f{ff_content2}, "Static ->move for move to new directory actually removes the old file" ); ok( -e $f{moved_2}, "Static ->move for move to new directory actually creates the new file" ); ok( check_content_file( $f{moved_2} ), "Static ->move moved the file without breaking it" ); # Test the static ->slurp method ok( check_content_file( $f{ff_content} ), "Content tester works" ); my $content = File::Flat->slurp(); ok( ! defined $content, "Static ->slurp returns error on no arguments" ); $content = File::Flat->slurp( $f{null} ); ok( ! defined $content, "Static ->slurp returns error on bad file" ); $content = File::Flat->slurp( $f{ff_content} ); ok( defined $content, "Static ->slurp returns defined" ); ok( defined $content, "Static ->slurp returns something" ); ok( UNIVERSAL::isa( $content, 'SCALAR' ), "Static ->slurp returns a scalar reference" ); ok( length $$content, "Static ->slurp returns content" ); ok( $$content eq $content_string, "Static ->slurp returns the correct file contents" ); # Test the static ->read $content = File::Flat->read(); ok( ! defined $content, "Static ->read returns error on no arguments" ); $content = File::Flat->read( $f{null} ); ok( ! defined $content, "Static ->read returns error on bad file" ); $content = File::Flat->read( $f{ff_content} ); ok( defined $content, "Static ->read doesn't error on good file" ); ok( $content, "Static ->read returns true on good file" ); ok( ref $content, "Static ->read returns a reference on good file" ); ok( UNIVERSAL::isa( $content, 'ARRAY' ), "Static ->read returns an array ref on good file" ); ok( scalar @$content == 4, "Static ->read returns the correct length of data" ); my $matches = ( $content->[0] eq 'one' and $content->[1] eq 'two' and $content->[2] eq 'three' and $content->[3] eq '' ) ? 1 : 0; ok( $matches, "Static ->read returns the expected content" ); # And again in an array context my @content = File::Flat->read(); ok( ! scalar @content, "Static ->read (array context) returns error on no arguments" ); @content = File::Flat->read( $f{null} ); ok( ! scalar @content, "Static ->read (array context) returns error on bad file" ); @content = File::Flat->read( $f{ff_content} ); ok( scalar @content, "Static ->read (array context) doesn't error on good file" ); ok( scalar @content == 4, "Static ->read (array context) returns the correct length of data" ); $matches = ( $content[0] eq 'one' and $content[1] eq 'two' and $content[2] eq 'three' and $content[3] eq '' ) ? 1 : 0; ok( $matches, "Static ->read (array context) returns the expected content" ); # Test the many and varies write() options. ok( ! File::Flat->write(), "->write() fails correctly" ); ok( ! File::Flat->write( $f{write_1} ), "->write( file ) fails correctly" ); ok( ! -e $f{write_1}, "->write( file ) doesn't actually create a file" ); $rv = File::Flat->write( $f{write_1}, $content_string ); ok( $rv, "->File::Flat->write( file, string ) returns true" ); ok( -e $f{write_1}, "->write( file, string ) actually creates a file" ); ok( check_content_file( $f{write_1} ), "->write( file, string ) writes the correct content" ); $rv = File::Flat->write( $f{write_2}, $content_string ); ok( $rv, "->File::Flat->write( file, string_ref ) returns true" ); ok( -e $f{write_2}, "->write( file, string_ref ) actually creates a file" ); ok( check_content_file( $f{write_2} ), "->write( file, string_ref ) writes the correct content" ); $rv = File::Flat->write( $f{write_3}, \@content_array ); ok( $rv, "->write( file, array_ref ) returns true" ); ok( -e $f{write_3}, "->write( file, array_ref ) actually creates a file" ); ok( check_content_file( $f{write_3} ), "->write( file, array_ref ) writes the correct content" ); # Repeat with a handle first argument my $handle = File::Flat->getWriteHandle( $f{write_4} ); ok( ! File::Flat->write( $handle ), "->write( handle ) fails correctly" ); ok( UNIVERSAL::isa( $handle, 'IO::Handle' ), 'Got write handle for test' ); $rv = File::Flat->write( $handle, $content_string ); $handle->close(); ok( $rv, "->write( handle, string ) returns true" ); ok( -e $f{write_4}, "->write( handle, string ) actually creates a file" ); ok( check_content_file( $f{write_1} ), "->write( handle, string ) writes the correct content" ); $handle = File::Flat->getWriteHandle( $f{write_5} ); ok( UNIVERSAL::isa( $handle, 'IO::Handle' ), 'Got write handle for test' ); $rv = File::Flat->write( $handle, $content_string ); $handle->close(); ok( $rv, "->File::Flat->write( handle, string_ref ) returns true" ); ok( -e $f{write_5}, "->write( handle, string_ref ) actually creates a file" ); ok( check_content_file( $f{write_5} ), "->write( handle, string_ref ) writes the correct content" ); $handle = File::Flat->getWriteHandle( $f{write_6} ); ok( UNIVERSAL::isa( $handle, 'IO::Handle' ), 'Got write handle for test' ); $rv = File::Flat->write( $handle, \@content_array ); $handle->close(); ok( $rv, "->File::Flat->write( handle, array_ref ) returns true" ); ok( -e $f{write_6}, "->write( handle, array_ref ) actually creates a file" ); ok( check_content_file( $f{write_6} ), "->write( handle, array_ref ) writes the correct content" ); # Check the ->overwrite method ok( ! File::Flat->overwrite(), "->overwrite() fails correctly" ); ok( ! File::Flat->overwrite( $f{over_1} ), "->overwrite( file ) fails correctly" ); ok( ! -e $f{over_1}, "->overwrite( file ) doesn't actually create a file" ); $rv = File::Flat->overwrite( $f{over_1}, $content_string ); ok( $rv, "->File::Flat->overwrite( file, string ) returns true" ); ok( -e $f{over_1}, "->overwrite( file, string ) actually creates a file" ); ok( check_content_file( $f{over_1} ), "->overwrite( file, string ) writes the correct content" ); $rv = File::Flat->overwrite( $f{over_2}, $content_string ); ok( $rv, "->File::Flat->overwrite( file, string_ref ) returns true" ); ok( -e $f{over_2}, "->overwrite( file, string_ref ) actually creates a file" ); ok( check_content_file( $f{over_2} ), "->overwrite( file, string_ref ) writes the correct content" ); $rv = File::Flat->overwrite( $f{over_3}, \@content_array ); ok( $rv, "->overwrite( file, array_ref ) returns true" ); ok( -e $f{over_3}, "->overwrite( file, array_ref ) actually creates a file" ); ok( check_content_file( $f{over_3} ), "->overwrite( file, array_ref ) writes the correct content" ); # Check actually overwriting a file ok ( File::Flat->copy( $f{ff_text}, $f{over_4} ), "Preparing for overwrite test" ); $rv = File::Flat->overwrite( $f{over_4}, \$content_string ); ok( $rv, "->overwrite( file, array_ref ) returns true" ); ok( -e $f{over_4}, "->overwrite( file, array_ref ) actually creates a file" ); ok( check_content_file( $f{over_4} ), "->overwrite( file, array_ref ) writes the correct content" ); # Check the basics of the ->remove method ok( ! File::Flat->remove(), "->remove() correctly return an error" ); ok( ! File::Flat->remove( $f{null} ), "->remove( file ) returns an error for a nonexistant file" ); ok( File::Flat->remove( $f{over_4} ), "->remove( file ) returns true for existing file" ); ok( ! -e $f{over_4}, "->remove( file ) actually removes the file" ); ok( File::Flat->remove( $f{a} ), "->remove( directory ) returns true for existing directory" ); ok( ! -e $f{a}, "->remove( directory ) actually removes the directory" ); # Check the append method ok( ! File::Flat->append(), "->append() correctly returns an error" ); ok( ! File::Flat->append( $f{append_1} ), "->append( file ) correctly returns an error" ); ok( ! -e $f{append_1}, "->append( file ) doesn't actually create a file" ); $rv = File::Flat->append( $f{append_1}, $content_string ); ok( $rv, "->File::Flat->append( file, string ) returns true" ); ok( -e $f{append_1}, "->append( file, string ) actually creates a file" ); ok( check_content_file( $f{append_1} ), "->append( file, string ) writes the correct content" ); $rv = File::Flat->append( $f{append_2}, $content_string ); ok( $rv, "->File::Flat->append( file, string_ref ) returns true" ); ok( -e $f{append_2}, "->append( file, string_ref ) actually creates a file" ); ok( check_content_file( $f{append_2} ), "->append( file, string_ref ) writes the correct content" ); $rv = File::Flat->append( $f{append_3}, \@content_array ); ok( $rv, "->append( file, array_ref ) returns true" ); ok( -e $f{append_3}, "->append( file, array_ref ) actually creates a file" ); ok( check_content_file( $f{append_3} ), "->append( file, array_ref ) writes the correct content" ); # Now let's try an actual append ok( File::Flat->append( $f{append_4}, "one\ntwo\n" ), "Preparing for real append" ); $rv = File::Flat->append( $f{append_4}, "three\n\n" ); ok( $rv, "->append( file, array_ref ) for an actual append returns true" ); ok( -e $f{append_4}, "->append( file, array_ref ): File still exists" ); ok( check_content_file( $f{append_4} ), "->append( file, array_ref ) results in the correct file contents" ); # Test the ->fileSize method ok( File::Flat->write( $f{size_1}, 'abcdefg' ) && File::Flat->write( $f{size_2}, join '', ( 'd' x 100000 ) ) && File::Flat->write( $f{size_3}, '' ), "Preparing for file size tests" ); ok( ! defined File::Flat->fileSize(), "->fileSize() correctly returns error" ); ok( ! defined File::Flat->fileSize( $f{null} ), '->fileSize( file ) returns error for nonexistant file' ); ok( ! defined File::Flat->fileSize( $f{a} ), '->fileSize( directory ) returns error' ); $rv = File::Flat->fileSize( $f{size_1} ); ok( defined $rv, "->fileSize( file ) returns true for small file" ); ok( $rv == 7, "->fileSize( file ) returns the correct size for small file" ); $rv = File::Flat->fileSize( $f{size_2} ); ok( defined $rv, "->fileSize( file ) returns true for big file" ); ok( $rv == 100000, "->fileSize( file ) returns the correct size for big file" ); $rv = File::Flat->fileSize( $f{size_3} ); ok( defined $rv, "->fileSize( file ) returns true for empty file" ); ok( $rv == 0, "->fileSize( file ) returns the correct size for empty file" ); # Test the ->truncate method. Use the append files ok( ! defined File::Flat->truncate(), '->truncate() correctly returns error' ); SKIP: { skip "Skipping tests known to fail for root", 1 if $root; ok( ! defined File::Flat->truncate( $f{rwx} ), '->truncate( file ) returns error when no permissions' ); } ok( ! defined File::Flat->truncate( './b' ), '->truncate( directory ) returns error' ); $rv = File::Flat->truncate( $f{trunc_1} ); ok( $rv, '->truncate( file ) returns true for non-existant file' ); ok( -e $f{trunc_1}, '->truncate( file ) creates new file' ); ok( File::Flat->fileSize( $f{trunc_1} ) == 0, '->truncate( file ) creates file of 0 bytes' ); $rv = File::Flat->truncate( $f{append_1} ); ok( $rv, '->truncate( file ) returns true for existing file' ); ok( -e $f{append_1}, '->truncate( file ): File still exists' ); ok( File::Flat->fileSize( $f{append_1} ) == 0, '->truncate( file ) truncates to 0 bytes' ); $rv = File::Flat->truncate( $f{append_2}, 0 ); ok( $rv, '->truncate( file, 0 ) returns true for existing file' ); ok( -e $f{append_2}, '->truncate( file, 0 ): File still exists' ); ok( File::Flat->fileSize( $f{append_2} ) == 0, '->truncate( file, 0 ) truncates to 0 bytes' ); $rv = File::Flat->truncate( $f{append_3}, 5 ); ok( $rv, '->truncate( file, 5 ) returns true for existing file' ); ok( -e $f{append_3}, '->truncate( file, 5 ): File still exists' ); ok( File::Flat->fileSize( $f{append_3} ) == 5, '->truncate( file, 5 ) truncates to 5 bytes' ); ##################################################################### # Test the prune method # Create the test directories foreach ( 1 .. 5 ) { my $directory = $f{"prune_$_"}; ok( File::Flat->makeDirectory( $directory ), "Created test directory '$directory'" ); } # Prune beneath the single dir $rv = File::Flat->prune( catfile($f{prune_1}, 'file.txt') ); ok( $rv, '->prune(single) returned true' ); ok( ! -e $f{prune_1}, '->prune(single) removed the single' ); ok( -d $f{prune}, '->prune(single) didn\'t remove the master prunedir' ); # Prune beneath the multiple dir $rv = File::Flat->prune( catfile($f{prune_2}, 'here') ); ok( $rv, '->prune(multiple) returned true' ); ok( ! -e $f{prune_2}, '->prune(multiple) removed the top dir' ); ok( ! -e $f{prune_2a}, '->prune(multiple) removed all the dirs' ); ok( -d $f{prune}, '->prune(multiple) didn\'t remove the master prunedir' ); # Prune stops correctly $rv = File::Flat->prune( catfile($f{prune_3}, 'foo') ); ok( $rv, '->prune(branched) returned true' ); ok( ! -e $f{prune_3}, '->prune(branched) removed the correct directory' ); ok( -d $f{prune_4}, '->prune(branched) doesn\'t remove side directory' ); ok( -d $f{prune}, '->prune(branched) didn\'t remove the master prunedir' ); # Don't prune anything $rv = File::Flat->prune( catfile($f{prune_4a}, 'blah') ); ok( $rv, '->prune(nothing) returned true' ); ok( -d $f{prune_4}, '->prune(nothing) doesn\'t remove side directory' ); ok( -d $f{prune}, '->prune(nothing) didn\'t remove the master prunedir' ); # Error when used as delete $rv = File::Flat->prune( $f{prune_5} ); is( $rv, undef, '->prune(existing) returns an error' ); ok( File::Flat->errstr, '->prune(existing) sets ->errstr' ); # Test remove, with the prune option. # Start by copying in some files to work with. # We'll use the last of the untouched append files foreach ( 1 .. 6 ) { ok( File::Flat->copy( $f{append_4}, catdir( $f{"remove_prune_$_"}, 'file' ) ), 'Copied in delete/prune test file' ); } # By default, AUTOPRUNE is off and we don't tell ->remove to prune ok( File::Flat->remove( catdir( $f{remove_prune_1}, 'file' ) ), '->remove(default) returns true' ); ok( -d $f{remove_prune_1}, '->remove(default) leaves dir intact' ); # Try with AUTOPRUNE on AUTOPRUNE: { local $File::Flat::AUTO_PRUNE = 1; ok( File::Flat->remove( catdir( $f{remove_prune_2}, 'file' ) ), '->remove(AUTO_PRUNE) returns true' ); ok( ! -e $f{remove_prune_2}, '->remove(AUTO_PRUNE) prunes directory' ); } # By default, AUTOPRUNE is off ok( File::Flat->remove( catdir( $f{remove_prune_3}, 'file' ) ), '->remove(default) returns true' ); ok( -d $f{remove_prune_3}, '->remove(default) leaves dir intact (AUTO_PRUNE used locally localises correctly)' ); # Tell ->remove to prune ok( File::Flat->remove( catdir( $f{remove_prune_4}, 'file' ), 1 ), '->remove(prune) returns true' ); ok( ! -e $f{remove_prune_4}, '->remove(AUTO_PRUNE) prunes directory' ); # Tell ->remove explicitly not to prune ok( File::Flat->remove( catdir( $f{remove_prune_5}, 'file' ), '' ), '->remove(noprune) returns true' ); ok( -d $f{remove_prune_5}, '->remove(noprune) leaves dir intact' ); # Make sure there's no warning with undef false value ok( File::Flat->remove( catdir( $f{remove_prune_6}, 'file' ), undef ), '->remove(noprune) returns true' ); ok( -d $f{remove_prune_6}, '->remove(noprune) leaves dir intact' ); exit(); sub check_content_file { my $file = shift; return undef unless -e $file; return undef unless -r $file; open( FILE, $file ) or return undef; @content = ; chomp @content; close FILE; return undef unless scalar @content == 4; return undef unless $content[0] eq 'one'; return undef unless $content[1] eq 'two'; return undef unless $content[2] eq 'three'; return undef unless $content[3] eq ''; return 1; } END { # When we finish there are going to be some pretty fucked up files. # Make them less so. foreach my $clean1 ( qw{ 0000 0100 0200 0300 0400 0500 0600 0700 ff_handle moved_1 write_1 write_2 write_3 write_4 write_5 write_6 over_1 over_2 over_3 over_4 append_1 append_2 append_3 append_4 size_1 size_2 size_3 trunc_1 } ) { if ( -e $clean1 ) { chmod 0600, $clean1; unlink $clean1; next; } my $clean2 = catfile( 't', $clean1 ); if ( -e $clean2 ) { chmod 0600, $clean2; unlink $clean2; next; } } foreach my $dir ( qw{a b baddir gooddir} ) { next unless -e $f{$dir}; chmod_R( 0700, $f{$dir} ); remove \1, $f{$dir}; } remove \1, $f{prune}; } File-Flat-1.05/t/ff_binary000600 000766 000024 00000012755 13411760707 015612 0ustar00etherstaff000000 000000 ;Class-Autouse-0.2.tar\{SDz Ba\T*%+ap>.νU;iw=uOa&AFY굍߼[mm1SڋFEը7^ghY15MY{N{~j}+7|~A[/^%AlxY3 z6C7S/ B/4? ; ǧ=(LUrn ) ~=jίA+`oU^CմzZn}<;>=x}V]?X]EÞ^[}c)YGu'~BO(]Pq %5㠚<8.a`cjn5xYXCblnA? (=vyS**Ʒ*'> "S1=Yk=8t b w74ͭW6AQ_iO%̴B77LyNinʽTc68$iw]'GĪTc'+4mDAhI7 (pR^g>7={qp~˾+]҉#J|Dm7H'ͭq|ۻѷ)څ2C ,[wz~n=>[g!r v,{uq}GzJ=XywG[;AdmG"j#aq&.-r/~:4q5pbfq?جbW9DNd,GՏIKb )P8QyAcgD|pS%ZN]Eǯ}"I寮ޡ F_s0ž% PYҀ, TaCF'=*}G!Fq)/ b!'=z.qم;PA21EXcN4#,!V%D5_h՚pyCOK\ yE'bEU F^ZD2x]/V''HS_0'ݜn:`nB AX'ZŠVzI=4m+z^l0q NT5 *I{ uK4?] <( XtBM@_W*&Ӄ#ᅅoo;D,nD} n[ !nۆ4:lfYJ{ɿ -8nLGhIbFqPzW'0HT$=5. & ̌MCiĈC!Pђ_u?|:9&p` s Ęi>D{u Eq슐ΐұXQ:x chzZ>kݐM1r|͑2Ue==>gIw#o$″O14{ [Zxo4T=GbAFNXv)\#n yT.JXT.0!N S34-}#0smBт@Ao~;-8C/*"cJ^]"b~Bh ߣĴmL<+@: V({.\-d0PD5L&Tgm"WSPP%hxqג  s!^=ON I/!gU!ET/p@3PUl{5g9`Y3aEF#($DȾm+b"XjcԂƷ=97'~L204`wڵ缾v[腦ld(eҎ2/ Tjd|jP+yz<|:|,F(jw]-5B kܤ[kEID9n8m@ʞ:)|"iN8jAyѲϋpлQ, ~:fA5RPA&dAJƭԏnkVoTfIMxXEV/' n"YZ#r# gq{:0^iHĔgxGOtTfY޳ƔlABj%Iܨ4Ak|\G-t!h x#ͨB>|pbւL %2ښM=[58rr..Z'G7<e!3*xw q㶏] K~dr7gqutZNo'ΎSFzT#+>UDakS㊤T}5yOUO[J8fA8Q8~GbX)M> D4ێZg?%qr.!)?0 IHEHG?чu@zr3B)馶MxŒ_EןaF1pD&/)ĽVQ/(xfTe"T21!qfтn_MH9ҙV0I}qd3U6s'"S(5MQ3e! r#/ %N>+ fC Ҹ.J1t@89: K,8R@×[V9M$2vT$pK_Cє銱j2ƪ|~2 8"J5pQ#'ЕKçslm@\[HHx\at >Ы/ͨDY3Tjp7'φ~OP*WSр_:)҉r QBPЮ#跙Q5@~K ڧE];K`v itdr]]Ps$jDXWk5UDpqDŽ{U^cΙvo'c_+b!y{6Q+mp*HdEbU'1D!\\t =먓dZI ',ҫMt Y:8zz|I-AYs4Dy٩</99ix|h.feɴ<}yj3SefO5%]l"ǦyRƞ'C<|v0ºG%yN\ȟoC6%Q}Oa#Zn?<"/?#S_+r:;3LlC3﫲"]+ X? }j ' 0, 'r' => 0, # Read '+<' => 1, 'r+' => 1, # ReadWrite '>' => 1, 'w' => 1, # Write '+>' => 1, 'w+' => 1, # ReadWrite '>>' => 1, 'a' => 1 # Append ); our $AUTO_PRUNE = ''; ##################################################################### # Examining the file system # Does a filesystem entity exist. sub exists { defined $_[1] and -e $_[1] } # Is a filesystem object a file. sub isaFile { defined $_[1] and -f $_[1] } # Is a filesystem object a directory. sub isaDirectory { defined $_[1] and -d $_[1] } # Do we have permission to read a filesystem object. sub canRead { defined $_[1] and -e $_[1] and -r _ } # Do we have permission to write to a filesystem object. # If it doesn't exist, can we create it. sub canWrite { # If it already exists, check normally return -w $_[1] if -e $_[1]; # Can we create it my $Object = File::Flat::Object->new( $_[1] ) or return undef; $Object->_canCreate; } # Can we both read and write to a filesystem object sub canReadWrite { defined $_[1] and -r $_[1] and -w _ } # Do we have permission to execute a filesystem object sub canExecute { defined $_[1] and -x $_[1] } # Could we open this as a file sub canOpen { defined $_[1] and -f $_[1] and -r _ } # Could a file or directory be removed, were we to try sub canRemove { # Pass through to the object class my $Object = File::Flat::Object->new( $_[1] ) or return undef; $Object->canRemove; } # Is the file a text file sub isText { defined $_[1] and -f $_[1] and -T $_[1] } # Is a file a binary file. sub isBinary { defined $_[1] and -f $_[1] and -B $_[1] } # Stat based methods. # I've included only the most usefull one I can think of. sub fileSize { my $class = shift; my $file = shift or return undef; # Check the file return $class->_error( 'File does not exist' ) unless -e $file; return $class->_error( 'Cannot get the file size for a directory' ) unless -f _; # A file's size is contained in element 7 (stat $file)[7]; } ##################################################################### # Opening Files. # Note: Files are closed conventionally using the IO::Handle's methods. # Open a file. # Takes as arguments either a ">filepath" style file name, or the two argument # form of "mode", "filename". Supports perl '<' type modes, and fopen 'rw' # type modes. Pipes and more advanced things are not supported. # Both the 1 and 2 argument modes are supported. # Returns an IO::File for the filesystem object. sub open { my $class = shift; # One or two argument form my ($file, $mode) = (); if ( @_ == 1 ) { $file = shift; # Read by default $mode = $file =~ s/^([<>+]{1,2})\s*// ? $1 : '<'; } elsif ( @_ == 2 ) { $mode = shift; $file = shift; } else { return $class->_error( "Invalid argument count to ->open" ); } # Check the mode unless ( exists $modes{$mode} ) { return $class->_error( "Unknown or unsupported mode '$mode'" ); } # Ensure the directory exists for those that need it my $remove_on_fail = ''; if ( $modes{$mode} and ! -e $file ) { $remove_on_fail = $class->_makePath( $file ); return undef unless defined $remove_on_fail; } # Try to get the IO::File IO::File->new( $file, $mode ) or $class->_andRemove( $remove_on_fail ); } # Provide creation mode specific methods sub getReadHandle { $_[0]->open( '<', $_[1] ) } sub getWriteHandle { $_[0]->open( '>', $_[1] ) } sub getAppendHandle { $_[0]->open( '>>', $_[1] ) } sub getReadWriteHandle { $_[0]->open( '+<', $_[1] ) } ##################################################################### # Quick File Methods # Slurp quickly reads in an entire file in a memory efficient manner. # Reads and file and returns a reference to a scalar containing the file. # Returns 0 if the file does not exist. # Returns undef on error. sub slurp { my $class = shift; my $file = shift or return undef; # Check the file $class->canOpen( $file ) or return $class->_error( "Unable to open file '$file'" ); # Use idiomatic slurp instead of File::Slurp _slurp($file) or $class->_error( "Error opening file '$file'", $! ); } # Provide a simple _slurp implementation sub _slurp { my $file = shift; local $/ = undef; local *SLURP; CORE::open( SLURP, "<$file" ) or return undef; my $source = ; CORE::close( SLURP ) or return undef; \$source; } # read reads in an entire file, returning it as an array or a reference to it. # depending on the calling context. Returns undef or () on error, depending on # the calling context. sub read { my $class = shift; my $file = shift or return; # Check the file unless ( $class->canOpen( $file ) ) { $class->_error( "Unable to open file '$file'" ); return; } # Load the file unless ( CORE::open(FILE, $file) ) { $class->_error( "Unable to open file '$file'" ); return; } my @content = ; chomp @content; CORE::close(FILE); wantarray ? @content : \@content; } # writeFile writes a file to the filesystem, replacing the existing file # if needed. Existing files will be clobbered before starting to write to # the file, as per a typical write file handle. sub write { my $class = shift; my $file = shift or return undef; unless ( defined $_[0] ) { return $class->_error( "Did not pass anything to write to file" ); } # Get a ref to the contents. # This looks messy, but it avoids copying potentially large amounts # of data in memory, bloating the RAM usage. # This also makes sure the stuff we are going to write is ok. my $contents; if ( ref $_[0] ) { unless ( UNIVERSAL::isa($_[0], 'SCALAR') or UNIVERSAL::isa($_[0], 'ARRAY') ) { return $class->_error( "Unknown or invalid argument to ->write" ); } $contents = $_[0]; } else { $contents = \$_[0]; } # Get an opened write file handle if we weren't passed a handle already. # When this falls out of context, it will close itself. # Since there are many things that act like file handles, don't check # specifically for IO::Handle or anything, just for a reference. my $dontclose = 0; if ( ref $file ) { # Don't close is someone passes us a handle. # They might want to write other things. $dontclose = 1; } else { $file = $class->getWriteHandle( $file ) or return undef; } # Write the contents to the handle if ( UNIVERSAL::isa($contents, 'SCALAR') ) { $file->print( $$contents ) or return undef; } else { foreach ( @$contents ) { # When printing the lines to the file, # fix any possible newline problems. chomp $_; $file->print( $_ . "\n" ) or return undef; } } # Close the file if needed $file->close unless $dontclose; 1; } # overwrite() writes a file to the filesystem, replacing the existing file # if needed. Existing files will be clobbered at the end of writing the file, # essentially allowing you to write the file to disk atomically. sub overwrite { my $class = shift; my $file = shift or return undef; return undef unless defined $_[0]; # Make sure we will be able to write over the file unless ( $class->canWrite($file) ) { return $class->_error( "Will not be able to create the file '$file'" ); } # Load in the two libraries we need. # It's a fair chunk of overhead, so we do it here instead of up # the top so it only loads in if we need to do overwriting. # Not as good as Class::Autouse, but these arn't OO modules. require File::Temp; require File::Copy; # Get a temp file my ($handle, $tempfile) = File::Temp::tempfile( SUFFIX => '.tmp', UNLINK => 0 ); # Write the content to it. # Pass the argument by reference if it isn't already, # to avoid copying large scalars. unless ( $class->write( $handle, ref $_[0] ? $_[0] : \$_[0] ) ) { # Clean up and return an error $handle->close; unlink $tempfile; return $class->_error( "Error while writing file" ); } # We are finished with the handle $handle->close; # Now move the finished file to the final location unless ( File::Copy::move( $tempfile, $file ) ) { # Clean up the tempfile and return an error unlink $tempfile; return $class->_error( "Failed to copy file into final location" ); } 1; } # appendFile writes content to the end of an existing file, or creating the # file if needed. sub append { my $class = shift; my $file = shift or return undef; return undef unless defined $_[0]; # Get the appending handle, and write to it my $handle = $class->getAppendHandle( $file ) or return undef; unless ( $class->write( $handle, ref $_[0] ? $_[0] : \$_[0] ) ) { # Clean up and return an error $handle->close; return $class->_error( "Error while writing file" ); } $handle->close; 1; } # Copy a file or directory from one place to another. # We apply our own copy semantics. sub copy { my $class = shift; return undef unless defined($_[0]) && defined($_[1]); my $source = File::Spec->canonpath( shift ) or return undef; my $target = File::Spec->canonpath( shift ) or return undef; # Check the source and target return $class->_error( "No such file or directory '$source'" ) unless -e $source; if ( -e $target ) { unless ( -f $source and -f $target ) { return $class->_error( "Won't overwrite " . (-f $target ? 'file' : 'directory') . " '$target' with " . (-f $source ? 'file' : 'directory') . " '$source'" ); } } unless ( $class->canWrite( $target ) ) { return $class->_error( "Insufficient permissions to create '$target'" ); } # Make sure the directory for the target exists my $remove_on_fail = $class->_makePath( $target ); return undef unless defined $remove_on_fail; if ( -f $source ) { # Copy a file to the new location require File::Copy; return File::Copy::copy( $source, $target ) ? 1 : $class->_andRemove( $remove_on_fail ); } # Create the target directory my $tocopy = File::Spec->catfile( $source, '*' ) or return undef; unless ( mkdir $target, 0755 ) { return $class->_andRemove( $remove_on_fail, "Failed to create directory '$target'" ); } # Hand off to File::Copy::Recursive require File::Copy::Recursive; my $rv = File::Copy::Recursive::dircopy( $tocopy, $target ); defined $rv ? $rv : $class->_andRemove( $remove_on_fail ); } # Move a file from one place to another. sub move { my $class = shift; my $source = shift or return undef; my $target = shift or return undef; # Check the source and target return $class->_error( "Copy source '$source' does not exist" ) unless -e $source; if ( -d $source and -f $target ) { return $class->_error( "Cannot overwrite non-directory '$source' with directory '$target'" ); } # Check permissions unless ( $class->canWrite( $target ) ) { return $class->_error( "Insufficient permissions to write to '$target'" ); } # Make sure the directory for the target exists my $remove_on_fail = $class->_makePath( $target ); return undef unless defined $remove_on_fail; # Do the file move require File::Copy; my $rv = File::Copy::move( $source, $target ); unless ( $rv ) { # Clean up after ourselves File::Flat->remove( $remove_on_fail ) if $remove_on_fail; return $class->_error( "Error moveing '$source' to '$target'" ); } 1; } # Remove a file or directory ( safely ) sub remove { my $class = shift; my $file = shift or return undef; # Does the file exist unless ( -e $file ) { return $class->_error( "File or directory does not exist" ); } # Use File::Remove to remove it require File::Remove; File::Remove::remove( \1, $file ) or return undef; ($AUTO_PRUNE or $_[0]) ? $class->prune( $file ) : 1; # Optionally prune } # For a given path, remove any empty directories left behind sub prune { my $Object = File::Flat::Object->new( $_[1] ) or return undef; $Object->prune; } # Truncate a file. That is, leave the file in place, # but reduce its size to a certain size, default 0. sub truncate { my $class = shift; my $file = shift or return undef; my $bytes = defined $_[0] ? shift : 0; # Beginning unless otherwise specified # Check the file return $class->_error( "Cannot truncate a directory" ) if -d $file; unless ( $class->canWrite( $file ) ) { return $class->_error( "Insufficient permissions to truncate file" ); } # Get a handle to the file and truncate it my $handle = $class->open( '>', $file ) or return $class->_error( 'Failed to open write file handle' ); $handle->truncate( $bytes ) or return $class->_error( "Failed to truncate file handle: $!" ); $handle->close; 1; } ##################################################################### # Directory Methods # Pass these through to the object version. It should be # better at this sort of thing. # Create a directory. # Returns true on success, undef on error. sub makeDirectory { my $Object = File::Flat::Object->new( $_[1] ) or return undef; $Object->makeDirectory; } # Make sure that everything above our path exists sub _makePath { my $Object = File::Flat::Object->new( $_[1] ) or return undef; $Object->_makePath; } # Legacy, kept around for CVS Monitor *_ensureDirectory = *_makePath; ##################################################################### # Error handling sub errstr { $errstr } sub _error { $errstr = $_[1]; undef } sub _andRemove { my $self = shift; my $to_remove = shift; if ( length $to_remove ) { require File::Remove; File::Remove::remove( $to_remove ); } @_ ? $self->_error(@_) : undef; } 1; package File::Flat::Object; # git description: fabfdb3 # Instantiatable version of File::Flat. # # The methods are the same as for File::Flat, where applicable. use strict; use File::Spec (); sub new { my $class = shift; my $filename = shift or return undef; bless { type => undef, original => $filename, absolute => undef, volume => undef, directories => undef, file => undef, }, $class; } sub _init { my $self = shift; # Get the current working directory. # If we don't pass it ourselves to File::Spec->rel2abs, # it might use a backtick `pwd`, which is horribly slow. my $base = Cwd::getcwd(); # Populate the other properties $self->{absolute} = File::Spec->rel2abs( $self->{original}, $base ); my ($v, $d, $f) = File::Spec->splitpath( $self->{absolute} ); my @dirs = File::Spec->splitdir( $d ); $self->{volume} = $v; $self->{directories} = \@dirs; $self->{file} = $f; $self->{type} = $self->{file} eq '' ? 'directory' : 'file'; 1; } # Define the basics sub exists { -e $_[0]->{original} } sub isaFile { -f $_[0]->{original} } sub isaDirectory { -d $_[0]->{original} } sub canRead { -e $_[0]->{original} and -r _ } sub canWrite { -e $_[0]->{original} and -w _ } sub canReadWrite { -e $_[0]->{original} and -r _ and -w _ } sub canExecute { -e $_[0]->{original} and -x _ } sub canOpen { -f $_[0]->{original} and -r _ } sub fileSize { File::Flat->fileSize( $_[0]->{original} ) } # Can we create this file/directory, if it doesn't exist. # Returns 2 if yes, but we need to create directories # Returns 1 if yes, and we won't need to create any directories. # Returns 0 if no. sub _canCreate { my $self = shift; $self->_init unless defined $self->{type}; # It it already exists, check for writable instead return $self->canWrite if -e $self->{original}; # Go up the directories and find the last one that exists my $dir_known = ''; my $dir_unknown = ''; my @dirs = @{$self->{directories}}; pop @dirs if $self->{file} eq ''; while ( defined( my $dir = shift @dirs ) ) { $dir_unknown = File::Spec->catdir( $dir_known, $dir ); # Does the filesystem object exist. # We use '' for the file part, because not specifying it at # all throws a warning. my $fullpath = File::Spec->catpath( $self->{volume}, $dir_unknown, '' ); last unless -e $fullpath; # This should be a directory if ( -d $fullpath ) { $dir_known = $dir_unknown; next; } # A file is where we think a directory should be 0; } # $dir_known now contains the last directory that exists. # Can we create filesystem objects under this? return 0 unless -w $dir_known; # If @dirs is empty, we don't need to create # any directories when we create the file @dirs ? 2 : 1; } ### FIXME - Implement this. # Should check the we can delete the file. # If it's a directory, should check that we can # recursively delete everything in it. sub canRemove { die "The ->canRemove method has not been implemented yet" } # Is the file a text file. sub isText { -e $_[0]->{original} and -f _ and -T $_[0]->{original} } # Is a file a binary file. sub isBinary { -e $_[0]->{original} and -f _ and -B $_[0]->{original} } ##################################################################### # Opening File # Pass these down to the static methods sub open { my $self = shift; defined $_[0] ? File::Flat->open( $self->{original}, $_[0] ) : File::Flat->open( $self->{original} ) } sub getReadHandle { File::Flat->open( '<', $_[0]->{original} ) } sub getWriteHandle { File::Flat->open( '>', $_[0]->{original} ) } sub getAppendHandle { File::Flat->open( '>>', $_[0]->{original} ) } sub getReadWriteHandle { File::Flat->open( '+<', $_[0]->{original} ) } ##################################################################### # Quick File Methods sub slurp { File::Flat->slurp( $_[0]->{original} ) } sub read { File::Flat->read( $_[0]->{original} ) } sub write { File::Flat->write( $_[0]->{original} ) } sub overwrite { File::Flat->overwrite( $_[0]->{original} ) } sub append { File::Flat->append( $_[0]->{original} ) } sub copy { File::Flat->copy( $_[0]->{original}, $_[1] ) } sub move { my $self = shift; my $moveTo = shift; File::Flat->move( $self->{original}, $moveTo ) or return undef; # Since the file is moving, once we actually # move the file, update the object information so # it refers to the new location. $self->{original} = $moveTo; # Re-initialise if we have already $self->init if $self->{type}; 1; } sub remove { File::Flat->remove( $_[0]->{original} ); } # For a given path, remove all empty files that were left behind # by previously deleting it. sub prune { my $self = shift; $self->_init unless defined $self->{type}; # We don't actually delete anything that currently exists if ( -e $self->{original} ) { return $self->_error('Bad use of ->prune, to try to delete a file'); } # Get the list of directories, fully resolved ### TO DO - Might be able to do this smaller or more efficiently ### by using List::Util::reduce my @dirs = @{$self->{directories}}; my @potential = ( File::Spec->catpath( $self->{volume}, shift(@dirs), '' ) ); while ( @dirs ) { push @potential, File::Spec->catdir( $potential[-1], shift(@dirs), '' ); } # Go backwards though this list foreach my $dir ( reverse @potential ) { # Not existing is good... it fulfils the intent next unless -e $dir; # This should also definately be a file unless ( -d $dir ) { return $self->_error('Found file where a directory was expected while pruning'); } # Does it contain anything, other that (possibly) curdir and updir entries opendir( PRUNEDIR, $dir ) or return $self->_error("opendir failed while pruning: $!"); my @files = readdir PRUNEDIR; closedir PRUNEDIR; foreach ( @files ) { next if $_ eq File::Spec->curdir; next if $_ eq File::Spec->updir; # Found something, we don't need to prune this, # or anything else for that matter. return 1; } # Nothing in the directory, we can delete it File::Flat->remove( $dir ) or return undef; } 1; } sub truncate { File::Flat->truncate( $_[0]->{original} ); } ##################################################################### # Directory methods # Create a directory. # Returns true on success, undef on error. sub makeDirectory { my $self = shift; my $mode = shift || 0755; if ( -e $self->{original} ) { return 1 if -d $self->{original}; return $self->_error( "'$self->{original}' already exists, and is a file" ); } $self->_init unless defined $self->{type}; # Ensure the directory below ours exists my $remove_on_fail = $self->_makePath( $mode ); return undef unless defined $remove_on_fail; # Create the directory unless ( mkdir $self->{original}, $mode ) { return $self->_andRemove( $remove_on_fail, "Failed to create directory '$self->{original}': $!" ); } 1; } # Make sure the directory that this file/directory is in exists. # Returns the root of the creation dirs if created. # Returns '' if nothing required. # Returns undef on error. sub _makePath { my $self = shift; my $mode = shift || 0755; return '' if -e $self->{original}; $self->_init unless defined $self->{type}; # Go up the directories and find the last one that exists my $dir_known = ''; my $dir_unknown = ''; my $creation_root = ''; my @dirs = @{$self->{directories}}; pop @dirs if $self->{file} eq ''; while ( defined( my $dir = shift @dirs ) ) { $dir_unknown = File::Spec->catdir( $dir_known, $dir ); # Does the filesystem object exist # We use '' for the file part, because not specifying it at # all throws a warning. my $fullpath = File::Spec->catpath( $self->{volume}, $dir_unknown, '' ); if ( -e $fullpath ) { # This should be a directory return undef unless -d $fullpath; } else { # Try to create the directory unless ( mkdir $dir_unknown, $mode ) { return $self->_error( $! ); } # Set the base of our creations to return $creation_root = $dir_unknown unless $creation_root; } $dir_known = $dir_unknown; } $creation_root; } # Legacy, kept around for CVS Monitor *_ensureDirectory = *_makePath; ##################################################################### # Error handling sub errstr { $File::Flat::errstr } sub _error { $File::Flat::errstr = $_[1]; undef } sub _andRemove { shift; File::Flat->_andRemove(@_) } 1; __END__ =pod =encoding UTF-8 =head1 NAME File::Flat - Implements a flat filesystem =head1 VERSION version 1.05 =head1 DESCRIPTION =for stopwords FSI.pm VMS canExecute canOpen canRead canReadWrite canRemove canWrite cp getAppendHandle getReadHandle getReadWriteHandle getWriteHandle isaBinary isaDirectory isaFile isaText makeDirectory File::Flat implements a flat filesystem. A flat filesystem is a filesystem in which directories do not exist. It provides an abstraction over any normal filesystem which makes it appear as if directories do not exist. In effect, it will automatically create directories as needed. This is create for things like install scripts and such, as you never need to worry about the existence of directories, just write to a file, no matter where it is. =head2 Comprehensive Implementation The implementation of File::Flat is extremely comprehensive in scope. It has methods for all standard file interaction tasks, the -X series of tests, and some other things, such as slurp. All methods are statically called, for example, to write some stuff to a file. use File::Flat; File::Flat->write( 'filename', 'file contents' ); =head2 Use of other modules File::Flat tries to use more task orientated modules wherever possible. This includes the use of L, L, L and others. These are mostly loaded on-demand. =head2 Pruning and $AUTO_PRUNE "Pruning" is a technique where empty directories are assumed to be useless, and thus empty removed whenever one is created. Thus, when some other task has the potential to leave an empty directory, it is checked and deleted if it is empty. By default File::Flat does not prune, and pruning must be done explicitly, via either the L method, or by setting the second argument to the L method to be true. However by setting the global C<$AUTO_PRUNE> variable to true, File::Flat will automatically prune directories at all times. You should generally use this locally, such as in the following example. #!/usr/bin/perl use strict; use File::Flat; delete_files(@ARGV); exit(); # Recursively delete and prune all files provided on the command line sub delete_files { local $File::Flat::AUTO_PRUNE = 1; foreach my $file ( @_ ) { File::Flat->remove( $file ) or die "Failed to delete $file"; } } =head2 Non-Unix platforms As of version 0.97 File::Flat should work correctly on Win32. Other platforms (such as VMS) are believed to work, but require confirmation. =head1 METHODS =head2 exists $filename Tests for the existence of the file. This is an exact duplicate of the -e function. =head2 isaFile $filename Tests whether C is a file. This is an exact duplicate of the -f function. =head2 isaDirectory $filename Test whether C is a directory. This is an exact duplicate of the -d function. =head2 canRead $filename Does the file or directory exist, and can we read from it. =head2 canWrite $filename Does the file or directory exist, and can we write to it B can we create the file or directory. =head2 canReadWrite $filename Does a file or directory exist, and can we both read and write it. =head2 canExecute $filename Does a file or directory exist, and can we execute it. =head2 canOpen $filename Is this something we can open a filehandle to. Returns true if filename exists, is a file, and we can read from it. =head2 canRemove $filename Can we remove the file or directory. =head2 isaText $filename Does the file C exist, and is it a text file. =head2 isaBinary $filename Does the file C exist, and is it a binary file. =head2 fileSize $filename If the file exists, returns its size in bytes. Returns undef if the file does not exist. =head2 open [ $mode, ] $filename Rough analogue of the open function, but creates directories on demand as needed. Supports most of the normal options to the normal open function. In the single argument form, it takes modes in the form [mode]filename. For example, all the following are valid. File::Flat->open( 'filename' ); File::Flat->open( 'open( '>filename' ); File::Flat->open( '>>filename' ); File::Flat->open( '+open( '<', 'filename' ); File::Flat->open( '>', 'filename' ); File::Flat->open( '>>', 'filename' ); File::Flat->open( '+<', 'filename' ); It does not support the more esoteric forms of open, such us opening to a pipe or other such things. On successfully opening the file, it returns it as an IO::File object. Returns undef on error. =head2 getReadHandle $filename The same as File::Flat->open( '<', 'filename' ) =head2 getWriteHandle $filename The same as File::Flat->open( '>', 'filename' ) =head2 getAppendHandle $filename The same as File::Flat->open( '>>', 'filename' ) =head2 getReadWriteHandle $filename The same as File::Flat->open( '+<', 'filename' ) =head2 read $filename Opens and reads in an entire file, chomping as needed. In array context, it returns an array containing each line of the file. In scalar context, it returns a reference to an array containing each line of the file. It returns undef on error. =head2 slurp $filename The C method 'slurps' a file in. That is it attempts to read the entire file into a variable in as quick and memory efficient method as possible. On success, returns a reference to a scalar, containing the entire file. Returns undef on error. =head2 write $filename, ( $content | \$content | \@content ) The C method is the main method for writing content to a file. It takes two arguments, the location to write to, and the content to write, in several forms. If the file already exists, it will be clobbered before writing starts. If the file doesn't exists, the file and any directories will be created as needed. Content can be provided in three forms. The contents of a scalar argument will be written directly to the file. You can optionally pass a reference to the scalar. This is recommended when the file size is bigger than a few thousand characters, is it does not duplicate the file contents in memory. Alternatively, you can pass the content as a reference to an array containing the contents. To ensure uniformity, C will add a newline to each line, replacing any existing newline as needed. Returns true on success, and undef on error. =head2 append $filename, ( $content | \$content | \@content ) This method is the same as C, except that it appends to the end of an existing file ( or creates the file as needed ). This is the method you should be using to write to log files, etc. =head2 overwrite $filename, ( $content | \$content | \@content ) Performs an atomic write over a file. It does this by writing to a temporary file, and moving the completed file over the top of the existing file ( or creating a new file as needed ). When writing to a file that is on the same partition as /tmp, this should always be atomic. This method otherwise acts the same as C. =head2 copy $source, $target The C method attempts to copy a file or directory from the source to the target. New directories to contain the target will be created as needed. For example C<( './this', './a/b/c/d/that' );>> will create the directory structure required as needed. In the file copy case, if the target already exists, and is a writable file, we replace the existing file, retaining file mode and owners. If the target is a directory, we do NOT copy into that directory, unlike with the 'cp' unix command. And error is instead returned. C will also do limited recursive copying or directories. If source is a directory, and target does not exists, a recursive copy of source will be made to target. If target already exists ( file or directory ), C will returns with an error. =head2 move $source, $target The C method follows the conventions of the 'mv' command, with the exception that the directories containing target will of course be created on demand. =head2 remove $filename [, $prune ] The C method will remove a file, or recursively remove a directory. If a second (true) argument is provided, then once the file or directory has been deleted, the method will the automatically work its way upwards pruning (deleting) empty and thus presumably useless directories. Returns true if the deletion (and pruning if requested) was a success, or C otherwise. =head2 prune $filename For a file that has already been delete, C will work upwards, removing any empty directories it finds. For anyone familiar with CVS, it is similar to the C flag. Returns true, or C on error. =head2 truncate $filename [, $size ] The C method will truncate an existing file to a particular size. A size of 0 ( zero ) is used if no size is provided. If the file does not exists, it will be created, and set to 0. Attempting to truncate a directory will fail. Returns true on success, or undef on error. =head2 makeDirectory $directory [, mode ] In the case where you do actually have to create a directory only, the C method can be used to create a directory or any depth. An optional file mode ( default 0755 ) can be provided. Returns true on success, returns undef on error. =head1 TO DO Function interface to be written, like L, to provide importable functions. There's something bigger here too, I'm not exactly sure what it is, but I think there might be the beginnings of a unified filesystem interface here... FSI.pm =head1 SEE ALSO L, L =head1 SUPPORT Bugs may be submitted through L (or L). =head1 AUTHOR Adam Kennedy =head1 CONTRIBUTORS =for stopwords Adam Kennedy Karen Etheridge =over 4 =item * Adam Kennedy =item * Karen Etheridge =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2002 by Adam Kennedy. 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