Mixin-Linewise-0.102/000075500000000000000000000000001224674341200143605ustar00rootroot00000000000000Mixin-Linewise-0.102/Changes000064400000000000000000000015521224674341200156560ustar00rootroot00000000000000Changelog for Mixin-Linewise 0.102 2013-11-02 11:36:22 America/New_York - revert the IO::String changes found in 0.101 0.101 2013-11-02 08:00:43 America/New_York [THIS MIGHT BREAK YOUR CODE] - tweak how read_string handles non-ASCII strings; needs further automated testing, so be sure to run your test suites 0.100 2013-10-18 15:55:59 America/New_York (TRIAL RELEASE) [THIS MIGHT BREAK YOUR CODE] - add binmode option to set binmode on opened filehandles; this defaults to encoding(UTF-8); thanks, David Golden! - typo fix by the inimitable David Steinbrunner 0.004 2013-06-18 17:30:31 America/New_York repackage 0.003 2010-02-14 add Test::More prereq 0.002 2008-06-05 update prereqs 0.001 2008-06-05 refactored out of Config-INI Mixin-Linewise-0.102/LICENSE000064400000000000000000000436611224674341200153770ustar00rootroot00000000000000This software is copyright (c) 2008 by Ricardo SIGNES. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. 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) 2008 by Ricardo SIGNES. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2008 by Ricardo SIGNES. 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 Mixin-Linewise-0.102/MANIFEST000064400000000000000000000004571224674341200155170ustar00rootroot00000000000000Changes LICENSE MANIFEST META.json META.yml Makefile.PL README dist.ini lib/Mixin/Linewise.pm lib/Mixin/Linewise/Readers.pm lib/Mixin/Linewise/Writers.pm t/000-report-versions-tiny.t t/data.txt t/encoding.t t/lib/MLTests.pm t/reader.t t/utf8.txt xt/release/changes_has_content.t xt/release/pod-syntax.t Mixin-Linewise-0.102/META.json000064400000000000000000000203661224674341200160100ustar00rootroot00000000000000{ "abstract" : "write your linewise code for handles; this does the rest", "author" : [ "Ricardo SIGNES " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 5.004, CPAN::Meta::Converter version 2.132830", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Mixin-Linewise", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.30" } }, "develop" : { "requires" : { "Test::Pod" : "1.41", "version" : "0.9901" } }, "runtime" : { "requires" : { "Carp" : "0", "IO::File" : "0", "IO::String" : "0", "Sub::Exporter" : "0", "perl" : "v5.8.1", "strict" : "0", "warnings" : "0" } }, "test" : { "requires" : { "Encode" : "0", "Test::More" : "0.96", "lib" : "0", "utf8" : "0" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/rjbs/Mixin-Linewise/issues" }, "homepage" : "https://github.com/rjbs/Mixin-Linewise", "repository" : { "type" : "git", "url" : "https://github.com/rjbs/Mixin-Linewise.git", "web" : "https://github.com/rjbs/Mixin-Linewise" } }, "version" : "0.102", "x_Dist_Zilla" : { "perl" : { "version" : "5.019005" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "name" : "@RJBS/Git::GatherDir", "version" : "2.017" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "@RJBS/CheckPrereqsIndexed", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::CheckExtraTests", "name" : "@RJBS/CheckExtraTests", "version" : "0.015" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "name" : "@RJBS/RJBS-Outdated", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "name" : "@RJBS/CPAN-Outdated", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@RJBS/@Filter/PruneCruft", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@RJBS/@Filter/ManifestSkip", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@RJBS/@Filter/MetaYAML", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@RJBS/@Filter/License", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@RJBS/@Filter/Readme", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@RJBS/@Filter/ExecDir", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@RJBS/@Filter/ShareDir", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", "name" : "@RJBS/@Filter/MakeMaker", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@RJBS/@Filter/Manifest", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@RJBS/@Filter/TestRelease", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@RJBS/@Filter/ConfirmRelease", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@RJBS/@Filter/UploadToCPAN", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@RJBS/AutoPrereqs", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::Git::NextVersion", "name" : "@RJBS/Git::NextVersion", "version" : "2.017" }, { "class" : "Dist::Zilla::Plugin::PkgVersion", "name" : "@RJBS/PkgVersion", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@RJBS/MetaConfig", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@RJBS/MetaJSON", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@RJBS/NextRelease", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent", "name" : "@RJBS/Test::ChangesHasContent", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@RJBS/PodSyntaxTests", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::ReportVersions::Tiny", "name" : "@RJBS/ReportVersions::Tiny", "version" : "1.10" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "test", "type" : "requires" } }, "name" : "@RJBS/TestMoreWithSubtests", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "config_plugin" : "@RJBS", "finder" : [ ":InstallModules", ":ExecFiles" ] } }, "name" : "@RJBS/PodWeaver", "version" : "3.102000" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "@RJBS/GithubMeta", "version" : "0.42" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "name" : "@RJBS/@Git/Check", "version" : "2.017" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "name" : "@RJBS/@Git/Commit", "version" : "2.017" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "name" : "@RJBS/@Git/Tag", "version" : "2.017" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "name" : "@RJBS/@Git/Push", "version" : "2.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "5.004" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "5.004" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "5.004" } } } Mixin-Linewise-0.102/META.yml000064400000000000000000000123571224674341200156410ustar00rootroot00000000000000--- abstract: 'write your linewise code for handles; this does the rest' author: - 'Ricardo SIGNES ' build_requires: Encode: 0 Test::More: 0.96 lib: 0 utf8: 0 configure_requires: ExtUtils::MakeMaker: 6.30 dynamic_config: 0 generated_by: 'Dist::Zilla version 5.004, CPAN::Meta::Converter version 2.132830' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Mixin-Linewise requires: Carp: 0 IO::File: 0 IO::String: 0 Sub::Exporter: 0 perl: v5.8.1 strict: 0 warnings: 0 resources: bugtracker: https://github.com/rjbs/Mixin-Linewise/issues homepage: https://github.com/rjbs/Mixin-Linewise repository: https://github.com/rjbs/Mixin-Linewise.git version: 0.102 x_Dist_Zilla: perl: version: 5.019005 plugins: - class: Dist::Zilla::Plugin::Git::GatherDir name: '@RJBS/Git::GatherDir' version: 2.017 - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: '@RJBS/CheckPrereqsIndexed' version: 0.009 - class: Dist::Zilla::Plugin::CheckExtraTests name: '@RJBS/CheckExtraTests' version: 0.015 - class: Dist::Zilla::Plugin::PromptIfStale name: '@RJBS/RJBS-Outdated' version: 0.008 - class: Dist::Zilla::Plugin::PromptIfStale name: '@RJBS/CPAN-Outdated' version: 0.008 - class: Dist::Zilla::Plugin::PruneCruft name: '@RJBS/@Filter/PruneCruft' version: 5.004 - class: Dist::Zilla::Plugin::ManifestSkip name: '@RJBS/@Filter/ManifestSkip' version: 5.004 - class: Dist::Zilla::Plugin::MetaYAML name: '@RJBS/@Filter/MetaYAML' version: 5.004 - class: Dist::Zilla::Plugin::License name: '@RJBS/@Filter/License' version: 5.004 - class: Dist::Zilla::Plugin::Readme name: '@RJBS/@Filter/Readme' version: 5.004 - class: Dist::Zilla::Plugin::ExecDir name: '@RJBS/@Filter/ExecDir' version: 5.004 - class: Dist::Zilla::Plugin::ShareDir name: '@RJBS/@Filter/ShareDir' version: 5.004 - class: Dist::Zilla::Plugin::MakeMaker name: '@RJBS/@Filter/MakeMaker' version: 5.004 - class: Dist::Zilla::Plugin::Manifest name: '@RJBS/@Filter/Manifest' version: 5.004 - class: Dist::Zilla::Plugin::TestRelease name: '@RJBS/@Filter/TestRelease' version: 5.004 - class: Dist::Zilla::Plugin::ConfirmRelease name: '@RJBS/@Filter/ConfirmRelease' version: 5.004 - class: Dist::Zilla::Plugin::UploadToCPAN name: '@RJBS/@Filter/UploadToCPAN' version: 5.004 - class: Dist::Zilla::Plugin::AutoPrereqs name: '@RJBS/AutoPrereqs' version: 5.004 - class: Dist::Zilla::Plugin::Git::NextVersion name: '@RJBS/Git::NextVersion' version: 2.017 - class: Dist::Zilla::Plugin::PkgVersion name: '@RJBS/PkgVersion' version: 5.004 - class: Dist::Zilla::Plugin::MetaConfig name: '@RJBS/MetaConfig' version: 5.004 - class: Dist::Zilla::Plugin::MetaJSON name: '@RJBS/MetaJSON' version: 5.004 - class: Dist::Zilla::Plugin::NextRelease name: '@RJBS/NextRelease' version: 5.004 - class: Dist::Zilla::Plugin::Test::ChangesHasContent name: '@RJBS/Test::ChangesHasContent' version: 0.006 - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@RJBS/PodSyntaxTests' version: 5.004 - class: Dist::Zilla::Plugin::ReportVersions::Tiny name: '@RJBS/ReportVersions::Tiny' version: 1.10 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: test type: requires name: '@RJBS/TestMoreWithSubtests' version: 5.004 - class: Dist::Zilla::Plugin::PodWeaver config: Dist::Zilla::Plugin::PodWeaver: config_plugin: '@RJBS' finder: - ':InstallModules' - ':ExecFiles' name: '@RJBS/PodWeaver' version: 3.102000 - class: Dist::Zilla::Plugin::GithubMeta name: '@RJBS/GithubMeta' version: 0.42 - class: Dist::Zilla::Plugin::Git::Check name: '@RJBS/@Git/Check' version: 2.017 - class: Dist::Zilla::Plugin::Git::Commit name: '@RJBS/@Git/Commit' version: 2.017 - class: Dist::Zilla::Plugin::Git::Tag name: '@RJBS/@Git/Tag' version: 2.017 - class: Dist::Zilla::Plugin::Git::Push name: '@RJBS/@Git/Push' version: 2.017 - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: 5.004 - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: 5.004 - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: 5.004 - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: 5.004 - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: 5.004 - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: 5.004 zilla: class: Dist::Zilla::Dist::Builder config: is_trial: 0 version: 5.004 Mixin-Linewise-0.102/Makefile.PL000064400000000000000000000024451224674341200163370ustar00rootroot00000000000000 use strict; use warnings; use 5.008001; use ExtUtils::MakeMaker 6.30; my %WriteMakefileArgs = ( "ABSTRACT" => "write your linewise code for handles; this does the rest", "AUTHOR" => "Ricardo SIGNES ", "BUILD_REQUIRES" => {}, "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.30" }, "DISTNAME" => "Mixin-Linewise", "EXE_FILES" => [], "LICENSE" => "perl", "NAME" => "Mixin::Linewise", "PREREQ_PM" => { "Carp" => 0, "IO::File" => 0, "IO::String" => 0, "Sub::Exporter" => 0, "strict" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "Encode" => 0, "Test::More" => "0.96", "lib" => 0, "utf8" => 0 }, "VERSION" => "0.102", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Carp" => 0, "Encode" => 0, "IO::File" => 0, "IO::String" => 0, "Sub::Exporter" => 0, "Test::More" => "0.96", "lib" => 0, "strict" => 0, "utf8" => 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); Mixin-Linewise-0.102/README000064400000000000000000000005061224674341200152410ustar00rootroot00000000000000 This archive contains the distribution Mixin-Linewise, version 0.102: write your linewise code for handles; this does the rest This software is copyright (c) 2008 by Ricardo SIGNES. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Mixin-Linewise-0.102/dist.ini000064400000000000000000000002671224674341200160310ustar00rootroot00000000000000name = Mixin-Linewise author = Ricardo SIGNES license = Perl_5 copyright_holder = Ricardo SIGNES copyright_year = 2008 [@RJBS] dont_compile = ^Mixin::Linewise$ Mixin-Linewise-0.102/lib/000075500000000000000000000000001224674341200151265ustar00rootroot00000000000000Mixin-Linewise-0.102/lib/Mixin/000075500000000000000000000000001224674341200162125ustar00rootroot00000000000000Mixin-Linewise-0.102/lib/Mixin/Linewise.pm000064400000000000000000000016631224674341200203350ustar00rootroot00000000000000use strict; use warnings; package Mixin::Linewise; { $Mixin::Linewise::VERSION = '0.102'; } # ABSTRACT: write your linewise code for handles; this does the rest use 5.006; use Carp (); Carp::confess "not meant to be loaded"; 1; __END__ =pod =head1 NAME Mixin::Linewise - write your linewise code for handles; this does the rest =head1 VERSION version 0.102 =head1 DESCRIPTION It's boring to deal with opening files for IO, converting strings to handle-like objects, and all that. With L and L, you can just write a method to handle handles, and methods for handling strings and filenames are added for you. =head1 AUTHOR Ricardo SIGNES =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2008 by Ricardo SIGNES. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Mixin-Linewise-0.102/lib/Mixin/Linewise/000075500000000000000000000000001224674341200177715ustar00rootroot00000000000000Mixin-Linewise-0.102/lib/Mixin/Linewise/Readers.pm000064400000000000000000000076451224674341200217300ustar00rootroot00000000000000use strict; use warnings; package Mixin::Linewise::Readers; { $Mixin::Linewise::Readers::VERSION = '0.102'; } # ABSTRACT: get linewise readers for strings and filenames use 5.8.1; # PerlIO use Carp (); use IO::File; use IO::String; use Sub::Exporter -setup => { exports => { map {; "read_$_" => \"_mk_read_$_" } qw(file string) }, groups => { default => [ qw(read_file read_string) ], readers => [ qw(read_file read_string) ], }, }; sub _mk_read_file { my ($self, $name, $arg) = @_; my $method = defined $arg->{method} ? $arg->{method} : 'read_handle'; my $dflt_enc = defined $arg->{binmode} ? $arg->{binmode} : 'encoding(UTF-8)'; sub { my ($invocant, $options, $filename); if ( ref $_[1] eq 'HASH' ) { # got options before filename ($invocant, $options, $filename) = splice @_, 0, 3; } else { ($invocant, $filename) = splice @_, 0, 2; } $options->{binmode} = $dflt_enc unless defined $options->{binmode}; $options->{binmode} =~ s/^://; # we add it later # Check the file Carp::croak "no filename specified" unless $filename; Carp::croak "file '$filename' does not exist" unless -e $filename; Carp::croak "'$filename' is not a plain file" unless -f _; my $handle = IO::File->new($filename, "<:$options->{binmode}") or Carp::croak "couldn't read file '$filename': $!"; $invocant->$method($handle, @_); } } sub _mk_read_string { my ($self, $name, $arg) = @_; my $method = defined $arg->{method} ? $arg->{method} : 'read_handle'; sub { my ($invocant, $string) = splice @_, 0, 2; Carp::croak "no string provided" unless defined $string; my $handle = IO::String->new(\$string); $invocant->$method($handle, @_); } } 1; __END__ =pod =head1 NAME Mixin::Linewise::Readers - get linewise readers for strings and filenames =head1 VERSION version 0.102 =head1 SYNOPSIS package Your::Pkg; use Mixin::Linewise::Readers -readers; sub read_handle { my ($self, $handle) = @_; LINE: while (my $line = $handle->getline) { next LINE if $line =~ /^#/; print "non-comment: $line"; } } Then: use Your::Pkg; Your::Pkg->read_file($filename); Your::Pkg->read_string($string); Your::Pkg->read_handle($fh); =head1 EXPORTS C and C are exported by default. Either can be requested individually, or renamed. They are generated by L, so consult its documentation for more information. Both can be generated with the option "method" which requests that a method other than "read_handle" is called with the created IO::Handle. If given a "binmode" option, any C type functions will use that as an IO layer, otherwise, the default is C. use Mixin::Linewise::Readers -readers => { binmode => "raw" }; use Mixin::Linewise::Readers -readers => { binmode => "encoding(iso-8859-1)" }; =head2 read_file Your::Pkg->read_file($filename); Your::Pkg->read_file($options, $filename); If generated, the C export attempts to open the named file for reading, and then calls C on the opened handle. An optional hash reference may be passed before C<$filename> with options. The only valid option currently is C, which overrides any default set from C or the built-in C. Any arguments after C<$filename> are passed along after to C. =head2 read_string Your::Pkg->read_string($string); If generated, the C creates an IO::String handle from the given string, and then calls C on the opened handle. Any arguments after C<$string> are passed along after to C. =head1 AUTHOR Ricardo SIGNES =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2008 by Ricardo SIGNES. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Mixin-Linewise-0.102/lib/Mixin/Linewise/Writers.pm000064400000000000000000000076021224674341200217730ustar00rootroot00000000000000use strict; use warnings; package Mixin::Linewise::Writers; { $Mixin::Linewise::Writers::VERSION = '0.102'; } # ABSTRACT: get linewise writers for strings and filenames use 5.8.1; # PerlIO use Carp (); use IO::File; use IO::String; use Sub::Exporter -setup => { exports => { map {; "write_$_" => \"_mk_write_$_" } qw(file string) }, groups => { default => [ qw(write_file write_string) ], writers => [ qw(write_file write_string) ], }, }; sub _mk_write_file { my ($self, $name, $arg) = @_; my $method = defined $arg->{method} ? $arg->{method} : 'write_handle'; my $dflt_enc = defined $arg->{binmode} ? $arg->{binmode} : 'encoding(UTF-8)'; sub { my ($invocant, $data, $options, $filename); if ( ref $_[2] eq 'HASH' ) { # got options before filename ($invocant, $data, $options, $filename) = splice @_, 0, 4; } else { ($invocant, $data, $filename) = splice @_, 0, 3; } $options->{binmode} = $dflt_enc unless defined $options->{binmode}; $options->{binmode} =~ s/^://; # we add it later # Check the file Carp::croak "no filename specified" unless $filename; Carp::croak "'$filename' is not a plain file" if -e $filename && ! -f _; # Write out the file my $handle = IO::File->new($filename, ">:$options->{binmode}") or Carp::croak "couldn't write to file '$filename': $!"; $invocant->write_handle($data, $handle, @_); } } sub _mk_write_string { my ($self, $name, $arg) = @_; my $method = defined $arg->{method} ? $arg->{method} : 'write_handle'; sub { my ($invocant, $data) = splice @_, 0, 2; my $string = ''; my $handle = IO::String->new($string); $invocant->write_handle($data, $handle, @_); return $string; } } 1; __END__ =pod =head1 NAME Mixin::Linewise::Writers - get linewise writers for strings and filenames =head1 VERSION version 0.102 =head1 SYNOPSIS package Your::Pkg; use Mixin::Linewise::Writers -writers; sub write_handle { my ($self, $data, $handle) = @_; $handle->print("datum: $_\n") for @$data; } Then: use Your::Pkg; Your::Pkg->write_file($data, $filename); Your::Pkg->write_string($data, $string); Your::Pkg->write_handle($data, $fh); =head1 EXPORTS C and C are exported by default. Either can be requested individually, or renamed. They are generated by L, so consult its documentation for more information. Both can be generated with the option "method" which requests that a method other than "write_handle" is called with the created IO::Handle. If given a "binmode" option, any C type functions will use that as an IO layer, otherwise, the default is C. use Mixin::Linewise::Writers -writers => { binmode => "raw" }; use Mixin::Linewise::Writers -writers => { binmode => "encoding(iso-8859-1)" }; =head2 write_file Your::Pkg->write_file($data, $filename); Your::Pkg->write_file($data, $options, $filename); This method will try to open a new file with the given name. It will then call C with that handle. An optional hash reference may be passed before C<$filename> with options. The only valid option currently is C, which overrides any default set from C or the built-in C. Any arguments after C<$filename> are passed along after to C. =head2 write_string my $string = Your::Pkg->write_string($data); C will create a new IO::String handle, call C to write to that handle, and return the resulting string. Any arguments after C<$data> are passed along after to C. =head1 AUTHOR Ricardo SIGNES =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2008 by Ricardo SIGNES. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Mixin-Linewise-0.102/t/000075500000000000000000000000001224674341200146235ustar00rootroot00000000000000Mixin-Linewise-0.102/t/000-report-versions-tiny.t000064400000000000000000000045271224674341200214570ustar00rootroot00000000000000use strict; use warnings; use Test::More 0.88; # This is a relatively nice way to avoid Test::NoWarnings breaking our # expectations by adding extra tests, without using no_plan. It also helps # avoid any other test module that feels introducing random tests, or even # test plans, is a nice idea. our $success = 0; END { $success && done_testing; } # List our own version used to generate this my $v = "\nGenerated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.10\n"; eval { # no excuses! # report our Perl details my $want = 'v5.8.1'; $v .= "perl: $] (wanted $want) on $^O from $^X\n\n"; }; defined($@) and diag("$@"); # Now, our module version dependencies: sub pmver { my ($module, $wanted) = @_; $wanted = " (want $wanted)"; my $pmver; eval "require $module;"; if ($@) { if ($@ =~ m/Can't locate .* in \@INC/) { $pmver = 'module not found.'; } else { diag("${module}: $@"); $pmver = 'died during require.'; } } else { my $version; eval { $version = $module->VERSION; }; if ($@) { diag("${module}: $@"); $pmver = 'died during VERSION check.'; } elsif (defined $version) { $pmver = "$version"; } else { $pmver = ''; } } # So, we should be good, right? return sprintf('%-45s => %-10s%-15s%s', $module, $pmver, $wanted, "\n"); } eval { $v .= pmver('Carp','any version') }; eval { $v .= pmver('Encode','any version') }; eval { $v .= pmver('ExtUtils::MakeMaker','6.30') }; eval { $v .= pmver('IO::File','any version') }; eval { $v .= pmver('IO::String','any version') }; eval { $v .= pmver('Sub::Exporter','any version') }; eval { $v .= pmver('Test::More','0.96') }; eval { $v .= pmver('lib','any version') }; eval { $v .= pmver('strict','any version') }; eval { $v .= pmver('utf8','any version') }; eval { $v .= pmver('warnings','any version') }; # All done. $v .= <<'EOT'; Thanks for using my code. I hope it works for you. If not, please try and include this output in the bug report. That will help me reproduce the issue and solve your problem. EOT diag($v); ok(1, "we really didn't test anything, just reporting data"); $success = 1; # Work around another nasty module on CPAN. :/ no warnings 'once'; $Template::Test::NO_FLUSH = 1; exit 0; Mixin-Linewise-0.102/t/data.txt000064400000000000000000000000371224674341200162750ustar00rootroot00000000000000x = 1 y = 1 x = 10 z = 2 x = 2 Mixin-Linewise-0.102/t/encoding.t000064400000000000000000000015271224674341200166030ustar00rootroot00000000000000use strict; use warnings; use Test::More 0.88; use utf8; use lib 't/lib'; use MLTests; use Encode qw/encode_utf8/; my $builder = Test::More->builder; binmode $builder->output, ":utf8"; binmode $builder->failure_output, ":utf8"; binmode $builder->todo_output, ":utf8"; my $name = "®icardo Sígnes"; my $raw = encode_utf8($name); for my $pair ( [ file_utf8 => 't/utf8.txt' => $name ], [ file_utf8 => 't/utf8.txt' => $raw => ":raw" ], [ file_raw => 't/utf8.txt' => $raw ], ) { my ($suffix, $file, $expected, $enc) = @$pair; my $options = $enc ? { binmode => $enc } : undef; my $method = "read_$suffix"; is_deeply( MLTests->$method(( $options ? $options : () ), $file), { author => $expected }, $enc ? "$method (with $enc)" : $method, ); } done_testing; # vim: ts=2 sts=2 sw=2 et: Mixin-Linewise-0.102/t/lib/000075500000000000000000000000001224674341200153715ustar00rootroot00000000000000Mixin-Linewise-0.102/t/lib/MLTests.pm000064400000000000000000000020721224674341200172630ustar00rootroot00000000000000use strict; package MLTests; use Mixin::Linewise::Readers -readers, -readers => { -suffix => '_sub', method => 'read_handle_sub' }, -readers => { -suffix => '_mul', method => 'read_handle_mul' }, -readers => { -suffix => '_utf8', method => 'read_handle_val' }, -readers => { -suffix => '_raw', method => 'read_handle_val', binmode => ':raw' }; sub read_handle { my ($self, $fh) = @_; my %return; while (<$fh>) { chomp; my ($k, $v) = split /\s*=\s*/; ($return{$k} ||= 0) += $v; }; return \%return; } sub read_handle_sub { my ($self, $fh) = @_; my %return; while (<$fh>) { chomp; my ($k, $v) = split /\s*=\s*/; ($return{$k} ||= 0) -= $v; }; return \%return; } sub read_handle_mul { my ($self, $fh) = @_; my %return; while (<$fh>) { chomp; my ($k, $v) = split /\s*=\s*/; ($return{$k} ||= 1) *= $v; }; return \%return; } sub read_handle_val { my ($self, $fh) = @_; my %return; while (<$fh>) { chomp; my ($k, $v) = split /\s*=\s*/; $return{$k} = $v; }; return \%return; } 1; Mixin-Linewise-0.102/t/reader.t000064400000000000000000000015641224674341200162600ustar00rootroot00000000000000use strict; use warnings; use Test::More 0.88; use lib 't/lib'; use MLTests; my $str = <<'END_STR'; x = 1 y = 1 x = 10 z = 2 x = 2 END_STR for my $pair ( [ string => $str ], [ file => 't/data.txt' ], [ handle => sub { open my $fh, '<', 't/data.txt' or die "can't open test data"; $fh } ], ) { my $base = "read_$pair->[0]"; my $arg = ref $pair->[1] ? $pair->[1]->() : $pair->[1]; is_deeply( MLTests->$base($arg), { x => 13, y => 1, z => 2 }, $base, ); my $sub = "read_$pair->[0]_sub"; $arg = ref $pair->[1] ? $pair->[1]->() : $pair->[1]; is_deeply( MLTests->$sub($arg), { x => -13, y => -1, z => -2 }, $sub, ); my $mul = "read_$pair->[0]_mul"; $arg = ref $pair->[1] ? $pair->[1]->() : $pair->[1]; is_deeply( MLTests->$mul($arg), { x => 20, y => 1, z => 2 }, $mul, ); } done_testing; Mixin-Linewise-0.102/t/utf8.txt000064400000000000000000000000321224674341200162450ustar00rootroot00000000000000author = ®icardo Sígnes Mixin-Linewise-0.102/xt/000075500000000000000000000000001224674341200150135ustar00rootroot00000000000000Mixin-Linewise-0.102/xt/release/000075500000000000000000000000001224674341200164335ustar00rootroot00000000000000Mixin-Linewise-0.102/xt/release/changes_has_content.t000064400000000000000000000020111224674341200226070ustar00rootroot00000000000000#!perl use Test::More tests => 2; note 'Checking Changes'; my $changes_file = 'Changes'; my $newver = '0.102'; my $trial_token = '-TRIAL'; 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; # _get_changes copied and adapted from Dist::Zilla::Plugin::Git::Commit # by Jerome Quelin 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>); 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; } Mixin-Linewise-0.102/xt/release/pod-syntax.t000064400000000000000000000002121224674341200207210ustar00rootroot00000000000000#!perl use Test::More; eval "use Test::Pod 1.41"; plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; all_pod_files_ok();