commit perl-Path-Class for openSUSE:Factory
Hello community, here is the log from the commit of package perl-Path-Class for openSUSE:Factory checked in at Tue May 31 16:51:12 CEST 2011. -------- --- perl-Path-Class/perl-Path-Class.changes 2011-04-02 21:31:41.000000000 +0200 +++ /mounts/work_src_done/STABLE/perl-Path-Class/perl-Path-Class.changes 2011-05-30 17:23:06.000000000 +0200 @@ -1,0 +2,11 @@ +Mon May 30 15:21:07 UTC 2011 - coolo@novell.com + +- updated to 0.24 + - Added a tempfile() method for Dir objects, which provides an + interface to File::Temp. [RT#60485] + + - Fixed a non-helpful fatal error message when calling resolve() on a + path that doesn't exist. Now dies with the proper "No such file or + directory" message & exit status. [GRAF] + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- Path-Class-0.23.tar.gz New: ---- Path-Class-0.24.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Path-Class.spec ++++++ --- /var/tmp/diff_new_pack.RSIUBX/_old 2011-05-31 16:49:56.000000000 +0200 +++ /var/tmp/diff_new_pack.RSIUBX/_new 2011-05-31 16:49:56.000000000 +0200 @@ -18,37 +18,19 @@ Name: perl-Path-Class -Version: 0.23 +Version: 0.24 Release: 1 License: GPL+ or Artistic %define cpan_name Path-Class Summary: Cross-platform path specification manipulation Url: http://search.cpan.org/dist/Path-Class/ Group: Development/Libraries/Perl -#Source: http://www.cpan.org/authors/id/K/KW/KWILLIAMS/Path-Class-%{version}.tar.gz -Source: %{cpan_name}-%{version}.tar.gz +Source: http://www.cpan.org/authors/id/K/KW/KWILLIAMS/%{cpan_name}-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl -BuildRequires: perl(Module::Build) BuildRequires: perl-macros -BuildRequires: perl(Cwd) -BuildRequires: perl(File::Path) -BuildRequires: perl(File::Spec) >= 0.87 -BuildRequires: perl(File::Spec::Mac) >= 1.3 -BuildRequires: perl(File::stat) -BuildRequires: perl(File::Temp) -BuildRequires: perl(IO::Dir) -BuildRequires: perl(IO::File) -BuildRequires: perl(overload) -Requires: perl(Cwd) -Requires: perl(File::Path) -Requires: perl(File::Spec) >= 0.87 -Requires: perl(File::Spec::Mac) >= 1.3 -Requires: perl(File::stat) -Requires: perl(IO::Dir) -Requires: perl(IO::File) -Requires: perl(overload) +BuildRequires: perl(Module::Build) >= 0.3601 %{perl_requires} %description @@ -63,6 +45,42 @@ way that won't actually work properly on platforms significantly different than the ones they've tested their code on. +In fact, 'Path::Class' uses 'File::Spec' internally, wrapping all the +unsightly details so you can concentrate on your application code. Whereas +'File::Spec' provides functions for some common path manipulations, +'Path::Class' provides an object-oriented model of the world of path +specifications and their underlying semantics. 'File::Spec' doesn't create +any objects, and its classes represent the different ways in which paths +must be manipulated on various platforms (not a very intuitive concept). +'Path::Class' creates objects representing files and directories, and +provides methods that relate them to each other. For instance, the +following 'File::Spec' code: + + my $absolute = File::Spec->file_name_is_absolute( + File::Spec->catfile( @dirs, $file ) + ); + +can be written using 'Path::Class' as + + my $absolute = Path::Class::File->new( @dirs, $file )->is_absolute; + +or even as + + my $absolute = file( @dirs, $file )->is_absolute; + +Similar readability improvements should happen all over the place when +using 'Path::Class'. + +Using 'Path::Class' can help solve real problems in your code too - for +instance, how many people actually take the "volume" (like 'C:' on Windows) +into account when writing 'File::Spec'-using code? I thought not. But if +you use 'Path::Class', your file and directory objects will know what +volumes they refer to and do the right thing. + +The guts of the 'Path::Class' code live in the 'Path::Class::File' and +'Path::Class::Dir' modules, so please see those modules' documentation for +more details about how to use them. + %prep %setup -q -n %{cpan_name}-%{version} @@ -81,7 +99,7 @@ %{__rm} -rf %{buildroot} %files -f %{name}.files -%defattr(644,root,root,755) -%doc Changes README +%defattr(-,root,root,755) +%doc Changes LICENSE README %changelog ++++++ Path-Class-0.23.tar.gz -> Path-Class-0.24.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Class-0.23/Build.PL new/Path-Class-0.24/Build.PL --- old/Path-Class-0.23/Build.PL 2010-12-26 20:42:56.000000000 +0100 +++ new/Path-Class-0.24/Build.PL 2011-05-29 03:53:45.000000000 +0200 @@ -1,34 +1,46 @@ -use Module::Build; +use strict; +use warnings; -my $b = Module::Build->new - ( - module_name => 'Path::Class', - license => 'perl', - requires => { - 'File::Spec' => 0.87, - 'File::Spec::Mac' => 1.3, - 'IO::Dir' => 0, - 'IO::File' => 0, - 'File::stat' => 0, - 'File::Path' => 0, - 'overload' => 0, - 'Cwd' => 0, - }, - build_requires => { - 'Test::More' => 0, - 'File::Temp' => 0, - }, - create_makefile_pl => 'traditional', - create_readme => 1, - meta_merge => { - resources => { - repository => 'http://perl-path-class.googlecode.com/svn/trunk', - homepage => 'http://code.google.com/p/perl-path-class', - bugtracker => 'http://rt.cpan.org/Public/Dist/Display.html?Name=Path-Class', - }, - }, - sign => 1, - ); +use Module::Build 0.3601; -$b->create_build_script; + +my %module_build_args = ( + 'build_requires' => { + 'Module::Build' => '0.3601', + 'Test' => '0', + 'Test::More' => '0' + }, + 'configure_requires' => { + 'ExtUtils::MakeMaker' => '6.30', + 'Module::Build' => '0.3601' + }, + 'dist_abstract' => 'Cross-platform path specification manipulation', + 'dist_author' => [ + 'Ken Williams <kwilliams@cpan.org>' + ], + 'dist_name' => 'Path-Class', + 'dist_version' => '0.24', + 'license' => 'perl', + 'module_name' => 'Path::Class', + 'recommends' => {}, + 'recursive_test_files' => 1, + 'requires' => { + 'Carp' => '0', + 'Cwd' => '0', + 'Exporter' => '0', + 'File::Path' => '0', + 'File::Spec' => '0.87', + 'File::Temp' => '0', + 'File::stat' => '0', + 'IO::Dir' => '0', + 'IO::File' => '0', + 'overload' => '0' + }, + 'script_files' => [] +); + + +my $build = Module::Build->new(%module_build_args); + +$build->create_build_script; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Class-0.23/Changes new/Path-Class-0.24/Changes --- old/Path-Class-0.23/Changes 2010-12-26 20:42:56.000000000 +0100 +++ new/Path-Class-0.24/Changes 2011-05-29 03:53:45.000000000 +0200 @@ -1,5 +1,14 @@ Revision history for Perl extension Path::Class. +0.24 Sat May 28 20:52:39 CDT 2011 + + - Added a tempfile() method for Dir objects, which provides an + interface to File::Temp. [RT#60485] + + - Fixed a non-helpful fatal error message when calling resolve() on a + path that doesn't exist. Now dies with the proper "No such file or + directory" message & exit status. [GRAF] + 0.23 - Sun Dec 26 13:35:53 CST 2010 - Fixed a bunch of problems with the distribution (e.g. in META.yml) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Class-0.23/LICENSE new/Path-Class-0.24/LICENSE --- old/Path-Class-0.23/LICENSE 1970-01-01 01:00:00.000000000 +0100 +++ new/Path-Class-0.24/LICENSE 2011-05-29 03:53:45.000000000 +0200 @@ -0,0 +1,377 @@ +This software is copyright (c) 2011 by Ken Williams. + +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) 2011 by Ken Williams. + +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. + 59 Temple Place, Suite 330, Boston, MA 02111-1307, 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. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) 19yy <name of author> + + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, 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. + + <signature of Ty Coon>, 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) 2011 by Ken Williams. + +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 + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Class-0.23/MANIFEST new/Path-Class-0.24/MANIFEST --- old/Path-Class-0.23/MANIFEST 2010-12-26 20:42:56.000000000 +0100 +++ new/Path-Class-0.24/MANIFEST 2011-05-29 03:53:45.000000000 +0200 @@ -1,6 +1,7 @@ Build.PL Changes INSTALL +LICENSE MANIFEST META.yml Makefile.PL @@ -15,4 +16,4 @@ t/02-foreign.t t/03-filesystem.t t/04-subclass.t -t/file-spec-tests +t/author-critic.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Class-0.23/META.yml new/Path-Class-0.24/META.yml --- old/Path-Class-0.23/META.yml 2010-12-26 20:42:56.000000000 +0100 +++ new/Path-Class-0.24/META.yml 2011-05-29 03:53:45.000000000 +0200 @@ -3,22 +3,26 @@ author: - 'Ken Williams <kwilliams@cpan.org>' build_requires: - File::Temp: 0 + Module::Build: 0.3601 + Test: 0 Test::More: 0 configure_requires: - ExtUtils::MakeMaker: 6.31 + ExtUtils::MakeMaker: 6.30 + Module::Build: 0.3601 dynamic_config: 0 -generated_by: 'Dist::Zilla version 4.200000, CPAN::Meta::Converter version 2.102400' +generated_by: 'Dist::Zilla version 4.200006, CPAN::Meta::Converter version 2.102400' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Path-Class requires: + Carp: 0 Cwd: 0 + Exporter: 0 File::Path: 0 File::Spec: 0.87 - File::Spec::Mac: 1.3 + File::Temp: 0 File::stat: 0 IO::Dir: 0 IO::File: 0 @@ -26,4 +30,4 @@ resources: bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Path-Class repository: http://perl-path-class.googlecode.com/svn/trunk -version: 0.23 +version: 0.24 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Class-0.23/Makefile.PL new/Path-Class-0.24/Makefile.PL --- old/Path-Class-0.23/Makefile.PL 2010-12-26 20:42:56.000000000 +0100 +++ new/Path-Class-0.24/Makefile.PL 2011-05-29 03:53:45.000000000 +0200 @@ -4,7 +4,7 @@ -use ExtUtils::MakeMaker 6.31; +use ExtUtils::MakeMaker 6.30; @@ -12,27 +12,31 @@ 'ABSTRACT' => 'Cross-platform path specification manipulation', 'AUTHOR' => 'Ken Williams <kwilliams@cpan.org>', 'BUILD_REQUIRES' => { - 'File::Temp' => '0', + 'Module::Build' => '0.3601', + 'Test' => '0', 'Test::More' => '0' }, 'CONFIGURE_REQUIRES' => { - 'ExtUtils::MakeMaker' => '6.31' + 'ExtUtils::MakeMaker' => '6.30', + 'Module::Build' => '0.3601' }, 'DISTNAME' => 'Path-Class', 'EXE_FILES' => [], 'LICENSE' => 'perl', 'NAME' => 'Path::Class', 'PREREQ_PM' => { + 'Carp' => '0', 'Cwd' => '0', + 'Exporter' => '0', 'File::Path' => '0', 'File::Spec' => '0.87', - 'File::Spec::Mac' => '1.3', + 'File::Temp' => '0', 'File::stat' => '0', 'IO::Dir' => '0', 'IO::File' => '0', 'overload' => '0' }, - 'VERSION' => '0.23', + 'VERSION' => '0.24', 'test' => { 'TESTS' => 't/*.t' } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Class-0.23/README new/Path-Class-0.24/README --- old/Path-Class-0.23/README 2010-12-26 20:42:56.000000000 +0100 +++ new/Path-Class-0.24/README 2011-05-29 03:53:45.000000000 +0200 @@ -1,127 +1,13 @@ -NAME - Path::Class - Cross-platform path specification manipulation -SYNOPSIS - use Path::Class; - - my $dir = dir('foo', 'bar'); # Path::Class::Dir object - my $file = file('bob', 'file.txt'); # Path::Class::File object - - # Stringifies to 'foo/bar' on Unix, 'foo\bar' on Windows, etc. - print "dir: $dir\n"; - - # Stringifies to 'bob/file.txt' on Unix, 'bob\file.txt' on Windows - print "file: $file\n"; - - my $subdir = $dir->subdir('baz'); # foo/bar/baz - my $parent = $subdir->parent; # foo/bar - my $parent2 = $parent->parent; # foo - - my $dir2 = $file->dir; # bob - - # Work with foreign paths - use Path::Class qw(foreign_file foreign_dir); - my $file = foreign_file('Mac', ':foo:file.txt'); - print $file->dir; # :foo: - print $file->as_foreign('Win32'); # foo\file.txt - - # Interact with the underlying filesystem: - - # $dir_handle is an IO::Dir object - my $dir_handle = $dir->open or die "Can't read $dir: $!"; - - # $file_handle is an IO::File object - my $file_handle = $file->open($mode) or die "Can't read $file: $!"; - -DESCRIPTION - `Path::Class' is a module for manipulation of file and directory - specifications (strings describing their locations, like - `'/home/ken/foo.txt'' or `'C:\Windows\Foo.txt'') in a cross-platform - manner. It supports pretty much every platform Perl runs on, including - Unix, Windows, Mac, VMS, Epoc, Cygwin, OS/2, and NetWare. - - The well-known module `File::Spec' also provides this service, but it's - sort of awkward to use well, so people sometimes avoid it, or use it in - a way that won't actually work properly on platforms significantly - different than the ones they've tested their code on. - - In fact, `Path::Class' uses `File::Spec' internally, wrapping all the - unsightly details so you can concentrate on your application code. - Whereas `File::Spec' provides functions for some common path - manipulations, `Path::Class' provides an object-oriented model of the - world of path specifications and their underlying semantics. - `File::Spec' doesn't create any objects, and its classes represent the - different ways in which paths must be manipulated on various platforms - (not a very intuitive concept). `Path::Class' creates objects - representing files and directories, and provides methods that relate - them to each other. For instance, the following `File::Spec' code: - - my $absolute = File::Spec->file_name_is_absolute( - File::Spec->catfile( @dirs, $file ) - ); - - can be written using `Path::Class' as - - my $absolute = Path::Class::File->new( @dirs, $file )->is_absolute; - - or even as - - my $absolute = file( @dirs, $file )->is_absolute; - - Similar readability improvements should happen all over the place when - using `Path::Class'. - - Using `Path::Class' can help solve real problems in your code too - for - instance, how many people actually take the "volume" (like `C:' on - Windows) into account when writing `File::Spec'-using code? I thought - not. But if you use `Path::Class', your file and directory objects will - know what volumes they refer to and do the right thing. - - The guts of the `Path::Class' code live in the `Path::Class::File' and - `Path::Class::Dir' modules, so please see those modules' documentation - for more details about how to use them. - - EXPORT - - The following functions are exported by default. - - file - A synonym for `Path::Class::File->new'. - - dir A synonym for `Path::Class::Dir->new'. - - If you would like to prevent their export, you may explicitly pass an - empty list to perl's `use', i.e. `use Path::Class ()'. - - The following are exported only on demand. - - foreign_file - A synonym for `Path::Class::File->new_foreign'. - - foreign_dir - A synonym for `Path::Class::Dir->new_foreign'. - -Notes on Cross-Platform Compatibility - Although it is much easier to write cross-platform-friendly code with - this module than with `File::Spec', there are still some issues to be - aware of. - - * Some platforms, notably VMS and some older versions of DOS (I - think), all filenames must have an extension. Thus if you create a - file called foo/bar and then ask for a list of files in the - directory foo, you may find a file called bar. instead of the bar - you were expecting. Thus it might be a good idea to use an extension - in the first place. - -AUTHOR - Ken Williams, KWILLIAMS@cpan.org -COPYRIGHT - Copyright (c) Ken Williams. All rights reserved. +This archive contains the distribution Path-Class, +version 0.24: - This library is free software; you can redistribute it and/or modify it - under the same terms as Perl itself. + Cross-platform path specification manipulation + +This software is copyright (c) 2011 by Ken Williams. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. -SEE ALSO - Path::Class::Dir, Path::Class::File, File::Spec diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Class-0.23/SIGNATURE new/Path-Class-0.24/SIGNATURE --- old/Path-Class-0.23/SIGNATURE 2010-12-26 20:42:59.000000000 +0100 +++ new/Path-Class-0.24/SIGNATURE 2011-05-29 03:53:52.000000000 +0200 @@ -14,27 +14,28 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -SHA1 3e94b50826015fe7ac1e769cadd656b53317d4ab Build.PL -SHA1 1923d4e05cce842d978a78536a958388a3675873 Changes +SHA1 ea792bf52b566bff462a76a5d4d50433e0b527ea Build.PL +SHA1 247c8647d187a81327719ee36cf6d4f9703db733 Changes SHA1 066a2dba8084a0c2a7e4b6996ad21872bc16beb5 INSTALL -SHA1 f4f533d5ba595558e925934701b6a624c1ae263a MANIFEST -SHA1 8d450b38f6346a82944f17f0b25be8c8d2a49df7 META.yml -SHA1 c56ae13703aa3a30404e13a4b321818fc865b8f2 Makefile.PL -SHA1 a7b1cdcddb8679dff993b475939abcfb73076afb README -SHA1 b40373e05544adc4447c5fad2509368fc6213b03 dist.ini -SHA1 e3b4393203382a6a4194a6ec852942f8898c8a61 lib/Path/Class.pm -SHA1 1aa682b45c70d04aecc6ba2b9cf7402650abbf5a lib/Path/Class/Dir.pm -SHA1 16c0113abd50b90bb9aa739fa5ee4b549e0ffbe1 lib/Path/Class/Entity.pm -SHA1 0ea60757f1483cb4287adcdf33c4c8233ba3fd90 lib/Path/Class/File.pm +SHA1 da0b89eff79e9d5128ab28d63e099b840cca39bf LICENSE +SHA1 52cb7d3f48ff3c95c8459535d1bd6e123ec44501 MANIFEST +SHA1 fb09dac402763a91c50f3e1949a51813f509afdb META.yml +SHA1 ce72ebc3d68832477effb18bc248d92211874f14 Makefile.PL +SHA1 243b575c9d7769d2cfd29c189ec2be8c883c4ece README +SHA1 a6ebbb825cd8d9c406a02ac08f3b7680d5d285f2 dist.ini +SHA1 07aaa412631cc8e6ea4276b3f3ea1fffbe5065f5 lib/Path/Class.pm +SHA1 8d6415121b20b7a701290105646ac48f0f691b5b lib/Path/Class/Dir.pm +SHA1 0549c1d2150621445a31f7688b2f5a878bb662f2 lib/Path/Class/Entity.pm +SHA1 8193c8bd639e4e5c01bbaf4f173970fa3a992507 lib/Path/Class/File.pm SHA1 212c128d87fa012c36016210e6e9213112fc3c23 t/01-basic.t SHA1 a42f4b07e4c42e7a59b960b13c5466d7cd82e17a t/02-foreign.t SHA1 ff702cdbf0bb4c25959cbc5a5c7db17772b7aa5b t/03-filesystem.t SHA1 a163d4cf70142b45974ed39c78571e7ce2ba5a7f t/04-subclass.t -SHA1 2c32aa5691540466533ae7c06753160f020818e9 t/file-spec-tests +SHA1 fa45d6e6ab1cd421349dea4ef527bfd5cdc8a09e t/author-critic.t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (Darwin) -iD8DBQFNF5rDgrvMBLfvlHYRAvbMAJ98sj5UZ5yLj0FkiXyu7P/NHq0vGACgnry1 -iuQgkpeJgSCL7Ljh0hfJRcQ= -=Fky1 +iD8DBQFN4acwgrvMBLfvlHYRAmIXAKC4w/k04B/Pm3pj3AUHDLUBxEKmFgCgpr+J +vFWvOuqcL5jRV9XPXUxGOCI= +=+Fzk -----END PGP SIGNATURE----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Class-0.23/dist.ini new/Path-Class-0.24/dist.ini --- old/Path-Class-0.23/dist.ini 2010-12-26 20:42:56.000000000 +0100 +++ new/Path-Class-0.24/dist.ini 2011-05-29 03:53:45.000000000 +0200 @@ -1,37 +1,25 @@ name = Path-Class -version = 0.23 +version = 0.24 author = Ken Williams <kwilliams@cpan.org> license = Perl_5 copyright_holder = Ken Williams -[GatherDir] +[@Basic] [PkgVersion] [PodVersion] -[TestRelease] -[ConfirmRelease] -[UploadToCPAN] - -[MetaYAML] -[MakeMaker] -[PruneCruft] -[Manifest] -[Signature] +[PruneFiles] +match = ~$ +match = ^Path-Class +[Signature] [Bugtracker] [Repository] +[ModuleBuild] + +[CriticTests] +;[PodCoverageTests] -[Prereqs] -File::Spec = 0.87 -File::Spec::Mac = 1.3 -IO::Dir = 0 -IO::File = 0 -File::stat = 0 -File::Path = 0 -overload = 0 -Cwd = 0 - -[Prereqs / TestRequires] -Test::More = 0 -File::Temp = 0 +[AutoPrereqs] +skip = ^English$ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Class-0.23/lib/Path/Class/Dir.pm new/Path-Class-0.24/lib/Path/Class/Dir.pm --- old/Path-Class-0.23/lib/Path/Class/Dir.pm 2010-12-26 20:42:56.000000000 +0100 +++ new/Path-Class-0.24/lib/Path/Class/Dir.pm 2011-05-29 03:53:45.000000000 +0200 @@ -1,15 +1,17 @@ +use strict; + package Path::Class::Dir; BEGIN { - $Path::Class::Dir::VERSION = '0.23'; + $Path::Class::Dir::VERSION = '0.24'; } -use strict; use Path::Class::File; use Carp(); use base qw(Path::Class::Entity); use IO::Dir (); use File::Path (); +use File::Temp (); # updir & curdir on the local machine, for screening them out in # children(). Note that they don't respect 'foreign' semantics. @@ -207,6 +209,7 @@ my $next = $self->{dh}->read; unless (defined $next) { delete $self->{dh}; + ## no critic return undef; } @@ -254,6 +257,11 @@ return !!(-d $self and (-e $other or -l $other) and $self->subsumes($other)); } +sub tempfile { + my $self = shift; + return File::Temp::tempfile(@_, DIR => $self->stringify); +} + 1; __END__ @@ -263,7 +271,7 @@ =head1 VERSION -version 0.23 +version 0.24 =head1 SYNOPSIS @@ -590,6 +598,37 @@ This method is mainly provided for consistency with C<Path::Class::File>'s C<remove()> method. +=item $dir->tempfile(...) + +An interface to C<File::Temp>'s C<tempfile()> function. Just like +that function, if you call this in a scalar context, the return value +is the filehandle and the file is C<unlink>ed as soon as possible +(which is immediately on Unix-like platforms). If called in a list +context, the return values are the filehandle and the filename. + +The given directory is passed as the C<DIR> parameter. + +Here's an example of pretty good usage which doesn't allow race +conditions, won't leave yucky tempfiles around on your filesystem, +etc.: + + my $fh = $dir->tempfile; + print $fh "Here's some data...\n"; + seek($fh, 0, 0); + while (<$fh>) { do something... } + +Or in combination with a C<fork>: + + my $fh = $dir->tempfile; + print $fh "Here's some more data...\n"; + seek($fh, 0, 0); + if ($pid=fork()) { + wait; + } else { + something($_) while <$fh>; + } + + =item $dir_or_file = $dir->next() A convenient way to iterate through directory contents. The first diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Class-0.23/lib/Path/Class/Entity.pm new/Path-Class-0.24/lib/Path/Class/Entity.pm --- old/Path-Class-0.23/lib/Path/Class/Entity.pm 2010-12-26 20:42:56.000000000 +0100 +++ new/Path-Class-0.24/lib/Path/Class/Entity.pm 2011-05-29 03:53:45.000000000 +0200 @@ -1,10 +1,11 @@ +use strict; + package Path::Class::Entity; BEGIN { - $Path::Class::Entity::VERSION = '0.23'; + $Path::Class::Entity::VERSION = '0.24'; } -use strict; -use File::Spec; +use File::Spec 0.87; use File::stat (); use Cwd; @@ -30,6 +31,7 @@ die "Invalid system type '$type'" unless ($type) = $type =~ /^(\w+)$/; # Untaint my $spec = "File::Spec::$type"; + ## no critic eval "require $spec; 1" or die $@; return $spec; } @@ -61,7 +63,8 @@ sub resolve { my $self = shift; - my $cleaned = $self->new( Cwd::realpath($self->stringify) ); + die $! unless -e $self; # No such file or directory + my $cleaned = $self->new( scalar Cwd::realpath($self->stringify) ); # realpath() always returns absolute path, kind of annoying $cleaned = $cleaned->relative if $self->is_relative; @@ -93,7 +96,7 @@ =head1 VERSION -version 0.23 +version 0.24 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Class-0.23/lib/Path/Class/File.pm new/Path-Class-0.24/lib/Path/Class/File.pm --- old/Path-Class-0.23/lib/Path/Class/File.pm 2010-12-26 20:42:56.000000000 +0100 +++ new/Path-Class-0.24/lib/Path/Class/File.pm 2011-05-29 03:53:45.000000000 +0200 @@ -1,9 +1,10 @@ +use strict; + package Path::Class::File; BEGIN { - $Path::Class::File::VERSION = '0.23'; + $Path::Class::File::VERSION = '0.24'; } -use strict; use Path::Class::Dir; use base qw(Path::Class::Entity); use Carp; @@ -103,7 +104,7 @@ =head1 VERSION -version 0.23 +version 0.24 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Class-0.23/lib/Path/Class.pm new/Path-Class-0.24/lib/Path/Class.pm --- old/Path-Class-0.23/lib/Path/Class.pm 2010-12-26 20:42:56.000000000 +0100 +++ new/Path-Class-0.24/lib/Path/Class.pm 2011-05-29 03:53:45.000000000 +0200 @@ -1,13 +1,18 @@ +use strict; + package Path::Class; BEGIN { - $Path::Class::VERSION = '0.23'; + $Path::Class::VERSION = '0.24'; } -@ISA = qw(Exporter); -@EXPORT = qw(file dir); -@EXPORT_OK = qw(file dir foreign_file foreign_dir); +{ + ## no critic + no strict 'vars'; + @ISA = qw(Exporter); + @EXPORT = qw(file dir); + @EXPORT_OK = qw(file dir foreign_file foreign_dir); +} -use strict; use Exporter; use Path::Class::File; use Path::Class::Dir; @@ -27,7 +32,7 @@ =head1 VERSION -version 0.23 +version 0.24 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Class-0.23/t/author-critic.t new/Path-Class-0.24/t/author-critic.t --- old/Path-Class-0.23/t/author-critic.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Path-Class-0.24/t/author-critic.t 2011-05-29 03:53:45.000000000 +0200 @@ -0,0 +1,20 @@ +#!perl + +BEGIN { + unless ($ENV{AUTHOR_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for testing by the author'); + } +} + + +use strict; +use warnings; + +use Test::More; +use English qw(-no_match_vars); + +eval "use Test::Perl::Critic"; +plan skip_all => 'Test::Perl::Critic required to criticise code' if $@; +Test::Perl::Critic->import( -profile => "perlcritic.rc" ) if -e "perlcritic.rc"; +all_critic_ok(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Class-0.23/t/file-spec-tests new/Path-Class-0.24/t/file-spec-tests --- old/Path-Class-0.23/t/file-spec-tests 2010-12-26 20:42:56.000000000 +0100 +++ new/Path-Class-0.24/t/file-spec-tests 1970-01-01 01:00:00.000000000 +0100 @@ -1,379 +0,0 @@ -#!./perl - -BEGIN { - $^O = ''; -#chdir 't' if -d 't'; -#unshift @INC, '../lib'; -} - -# Each element in this array is a single test. Storing them this way makes -# maintenance easy, and should be OK since perl should be pretty functional -# before these tests are run. - -@tests = ( -# Function Expected -[ "Unix->catfile('a','b','c')", 'a/b/c' ], - -[ "Unix->splitpath('file')", ',,file' ], -[ "Unix->splitpath('/d1/d2/d3/')", ',/d1/d2/d3/,' ], -[ "Unix->splitpath('d1/d2/d3/')", ',d1/d2/d3/,' ], -[ "Unix->splitpath('/d1/d2/d3/.')", ',/d1/d2/d3/.,' ], -[ "Unix->splitpath('/d1/d2/d3/..')", ',/d1/d2/d3/..,' ], -[ "Unix->splitpath('/d1/d2/d3/.file')", ',/d1/d2/d3/,.file' ], -[ "Unix->splitpath('d1/d2/d3/file')", ',d1/d2/d3/,file' ], -[ "Unix->splitpath('/../../d1/')", ',/../../d1/,' ], -[ "Unix->splitpath('/././d1/')", ',/././d1/,' ], - -[ "Unix->catpath('','','file')", 'file' ], -[ "Unix->catpath('','/d1/d2/d3/','')", '/d1/d2/d3/' ], -[ "Unix->catpath('','d1/d2/d3/','')", 'd1/d2/d3/' ], -[ "Unix->catpath('','/d1/d2/d3/.','')", '/d1/d2/d3/.' ], -[ "Unix->catpath('','/d1/d2/d3/..','')", '/d1/d2/d3/..' ], -[ "Unix->catpath('','/d1/d2/d3/','.file')", '/d1/d2/d3/.file' ], -[ "Unix->catpath('','d1/d2/d3/','file')", 'd1/d2/d3/file' ], -[ "Unix->catpath('','/../../d1/','')", '/../../d1/' ], -[ "Unix->catpath('','/././d1/','')", '/././d1/' ], -[ "Unix->catpath('d1','d2/d3/','')", 'd2/d3/' ], -[ "Unix->catpath('d1','d2','d3/')", 'd2/d3/' ], - -[ "Unix->splitdir('')", '' ], -[ "Unix->splitdir('/d1/d2/d3/')", ',d1,d2,d3,' ], -[ "Unix->splitdir('d1/d2/d3/')", 'd1,d2,d3,' ], -[ "Unix->splitdir('/d1/d2/d3')", ',d1,d2,d3' ], -[ "Unix->splitdir('d1/d2/d3')", 'd1,d2,d3' ], - -[ "Unix->catdir()", '' ], -[ "Unix->catdir('/')", '/' ], -[ "Unix->catdir('','d1','d2','d3','')", '/d1/d2/d3' ], -[ "Unix->catdir('d1','d2','d3','')", 'd1/d2/d3' ], -[ "Unix->catdir('','d1','d2','d3')", '/d1/d2/d3' ], -[ "Unix->catdir('d1','d2','d3')", 'd1/d2/d3' ], - -[ "Unix->catfile('a','b','c')", 'a/b/c' ], - -[ "Unix->canonpath('')", '' ], -[ "Unix->canonpath('///../../..//./././a//b/.././c/././')", '/a/b/../c' ], -[ "Unix->canonpath('/.')", '/.' ], - -[ "Unix->abs2rel('/t1/t2/t3','/t1/t2/t3')", '' ], -[ "Unix->abs2rel('/t1/t2/t4','/t1/t2/t3')", '../t4' ], -[ "Unix->abs2rel('/t1/t2','/t1/t2/t3')", '..' ], -[ "Unix->abs2rel('/t1/t2/t3/t4','/t1/t2/t3')", 't4' ], -[ "Unix->abs2rel('/t4/t5/t6','/t1/t2/t3')", '../../../t4/t5/t6' ], -#[ "Unix->abs2rel('../t4','/t1/t2/t3')", '../t4' ], -[ "Unix->abs2rel('/','/t1/t2/t3')", '../../..' ], -[ "Unix->abs2rel('///','/t1/t2/t3')", '../../..' ], -[ "Unix->abs2rel('/.','/t1/t2/t3')", '../../../.' ], -[ "Unix->abs2rel('/./','/t1/t2/t3')", '../../..' ], -#[ "Unix->abs2rel('../t4','/t1/t2/t3')", '../t4' ], - -[ "Unix->rel2abs('t4','/t1/t2/t3')", '/t1/t2/t3/t4' ], -[ "Unix->rel2abs('t4/t5','/t1/t2/t3')", '/t1/t2/t3/t4/t5' ], -[ "Unix->rel2abs('.','/t1/t2/t3')", '/t1/t2/t3' ], -[ "Unix->rel2abs('..','/t1/t2/t3')", '/t1/t2/t3/..' ], -[ "Unix->rel2abs('../t4','/t1/t2/t3')", '/t1/t2/t3/../t4' ], -[ "Unix->rel2abs('/t1','/t1/t2/t3')", '/t1' ], - -[ "Win32->splitpath('file')", ',,file' ], -[ "Win32->splitpath('\\d1/d2\\d3/')", ',\\d1/d2\\d3/,' ], -[ "Win32->splitpath('d1/d2\\d3/')", ',d1/d2\\d3/,' ], -[ "Win32->splitpath('\\d1/d2\\d3/.')", ',\\d1/d2\\d3/.,' ], -[ "Win32->splitpath('\\d1/d2\\d3/..')", ',\\d1/d2\\d3/..,' ], -[ "Win32->splitpath('\\d1/d2\\d3/.file')", ',\\d1/d2\\d3/,.file' ], -[ "Win32->splitpath('\\d1/d2\\d3/file')", ',\\d1/d2\\d3/,file' ], -[ "Win32->splitpath('d1/d2\\d3/file')", ',d1/d2\\d3/,file' ], -[ "Win32->splitpath('C:\\d1/d2\\d3/')", 'C:,\\d1/d2\\d3/,' ], -[ "Win32->splitpath('C:d1/d2\\d3/')", 'C:,d1/d2\\d3/,' ], -[ "Win32->splitpath('C:\\d1/d2\\d3/file')", 'C:,\\d1/d2\\d3/,file' ], -[ "Win32->splitpath('C:d1/d2\\d3/file')", 'C:,d1/d2\\d3/,file' ], -[ "Win32->splitpath('C:\\../d2\\d3/file')", 'C:,\\../d2\\d3/,file' ], -[ "Win32->splitpath('C:../d2\\d3/file')", 'C:,../d2\\d3/,file' ], -[ "Win32->splitpath('\\../..\\d1/')", ',\\../..\\d1/,' ], -[ "Win32->splitpath('\\./.\\d1/')", ',\\./.\\d1/,' ], -[ "Win32->splitpath('\\\\node\\share\\d1/d2\\d3/')", '\\\\node\\share,\\d1/d2\\d3/,' ], -[ "Win32->splitpath('\\\\node\\share\\d1/d2\\d3/file')", '\\\\node\\share,\\d1/d2\\d3/,file' ], -[ "Win32->splitpath('\\\\node\\share\\d1/d2\\file')", '\\\\node\\share,\\d1/d2\\,file' ], -[ "Win32->splitpath('file',1)", ',file,' ], -[ "Win32->splitpath('\\d1/d2\\d3/',1)", ',\\d1/d2\\d3/,' ], -[ "Win32->splitpath('d1/d2\\d3/',1)", ',d1/d2\\d3/,' ], -[ "Win32->splitpath('\\\\node\\share\\d1/d2\\d3/',1)", '\\\\node\\share,\\d1/d2\\d3/,' ], - -[ "Win32->catpath('','','file')", 'file' ], -[ "Win32->catpath('','\\d1/d2\\d3/','')", '\\d1/d2\\d3/' ], -[ "Win32->catpath('','d1/d2\\d3/','')", 'd1/d2\\d3/' ], -[ "Win32->catpath('','\\d1/d2\\d3/.','')", '\\d1/d2\\d3/.' ], -[ "Win32->catpath('','\\d1/d2\\d3/..','')", '\\d1/d2\\d3/..' ], -[ "Win32->catpath('','\\d1/d2\\d3/','.file')", '\\d1/d2\\d3/.file' ], -[ "Win32->catpath('','\\d1/d2\\d3/','file')", '\\d1/d2\\d3/file' ], -[ "Win32->catpath('','d1/d2\\d3/','file')", 'd1/d2\\d3/file' ], -[ "Win32->catpath('C:','\\d1/d2\\d3/','')", 'C:\\d1/d2\\d3/' ], -[ "Win32->catpath('C:','d1/d2\\d3/','')", 'C:d1/d2\\d3/' ], -[ "Win32->catpath('C:','\\d1/d2\\d3/','file')", 'C:\\d1/d2\\d3/file' ], -[ "Win32->catpath('C:','d1/d2\\d3/','file')", 'C:d1/d2\\d3/file' ], -[ "Win32->catpath('C:','\\../d2\\d3/','file')", 'C:\\../d2\\d3/file' ], -[ "Win32->catpath('C:','../d2\\d3/','file')", 'C:../d2\\d3/file' ], -[ "Win32->catpath('','\\../..\\d1/','')", '\\../..\\d1/' ], -[ "Win32->catpath('','\\./.\\d1/','')", '\\./.\\d1/' ], -[ "Win32->catpath('\\\\node\\share','\\d1/d2\\d3/','')", '\\\\node\\share\\d1/d2\\d3/' ], -[ "Win32->catpath('\\\\node\\share','\\d1/d2\\d3/','file')", '\\\\node\\share\\d1/d2\\d3/file' ], -[ "Win32->catpath('\\\\node\\share','\\d1/d2\\','file')", '\\\\node\\share\\d1/d2\\file' ], - -[ "Win32->splitdir('')", '' ], -[ "Win32->splitdir('\\d1/d2\\d3/')", ',d1,d2,d3,' ], -[ "Win32->splitdir('d1/d2\\d3/')", 'd1,d2,d3,' ], -[ "Win32->splitdir('\\d1/d2\\d3')", ',d1,d2,d3' ], -[ "Win32->splitdir('d1/d2\\d3')", 'd1,d2,d3' ], - -[ "Win32->catdir()", '' ], -[ "Win32->catdir('')", '\\' ], -[ "Win32->catdir('/')", '\\' ], -[ "Win32->catdir('//d1','d2')", '\\\\d1\\d2' ], -[ "Win32->catdir('','/d1','d2')", '\\\\d1\\d2' ], -[ "Win32->catdir('','','/d1','d2')", '\\\\\\d1\\d2' ], -[ "Win32->catdir('','//d1','d2')", '\\\\\\d1\\d2' ], -[ "Win32->catdir('','','//d1','d2')", '\\\\\\\\d1\\d2' ], -[ "Win32->catdir('','d1','','d2','')", '\\d1\\d2' ], -[ "Win32->catdir('','d1','d2','d3','')", '\\d1\\d2\\d3' ], -[ "Win32->catdir('d1','d2','d3','')", 'd1\\d2\\d3' ], -[ "Win32->catdir('','d1','d2','d3')", '\\d1\\d2\\d3' ], -[ "Win32->catdir('d1','d2','d3')", 'd1\\d2\\d3' ], -[ "Win32->catdir('A:/d1','d2','d3')", 'A:\\d1\\d2\\d3' ], -[ "Win32->catdir('A:/d1','d2','d3','')", 'A:\\d1\\d2\\d3' ], -#[ "Win32->catdir('A:/d1','B:/d2','d3','')", 'A:\\d1\\d2\\d3' ], -[ "Win32->catdir('A:/d1','B:/d2','d3','')", 'A:\\d1\\B:\\d2\\d3' ], -[ "Win32->catdir('A:/')", 'A:\\' ], - -[ "Win32->catfile('a','b','c')", 'a\\b\\c' ], - -[ "Win32->canonpath('')", '' ], -[ "Win32->canonpath('a:')", 'A:' ], -[ "Win32->canonpath('A:f')", 'A:f' ], -[ "Win32->canonpath('//a\\b//c')", '\\\\a\\b\\c' ], -[ "Win32->canonpath('/a/..../c')", '\\a\\....\\c' ], -[ "Win32->canonpath('//a/b\\c')", '\\\\a\\b\\c' ], -[ "Win32->canonpath('////')", '\\\\\\' ], -[ "Win32->canonpath('//')", '\\' ], -[ "Win32->canonpath('/.')", '\\.' ], -[ "Win32->canonpath('//a/b/../../c')", '\\\\a\\b\\..\\..\\c' ], -[ "Win32->canonpath('//a/../../c')", '\\\\a\\..\\..\\c' ], - -[ "Win32->abs2rel('/t1/t2/t3','/t1/t2/t3')", '' ], -[ "Win32->abs2rel('/t1/t2/t4','/t1/t2/t3')", '..\\t4' ], -[ "Win32->abs2rel('/t1/t2','/t1/t2/t3')", '..' ], -[ "Win32->abs2rel('/t1/t2/t3/t4','/t1/t2/t3')", 't4' ], -[ "Win32->abs2rel('/t4/t5/t6','/t1/t2/t3')", '..\\..\\..\\t4\\t5\\t6' ], -#[ "Win32->abs2rel('../t4','/t1/t2/t3')", '\\t1\\t2\\t3\\..\\t4' ], -[ "Win32->abs2rel('/','/t1/t2/t3')", '..\\..\\..' ], -[ "Win32->abs2rel('///','/t1/t2/t3')", '..\\..\\..' ], -[ "Win32->abs2rel('/.','/t1/t2/t3')", '..\\..\\..\\.' ], -[ "Win32->abs2rel('/./','/t1/t2/t3')", '..\\..\\..' ], -[ "Win32->abs2rel('\\\\a/t1/t2/t4','/t2/t3')", '..\\t4' ], -[ "Win32->abs2rel('//a/t1/t2/t4','/t2/t3')", '..\\t4' ], - -[ "Win32->rel2abs('temp','C:/')", 'C:\\temp' ], -[ "Win32->rel2abs('temp','C:/a')", 'C:\\a\\temp' ], -[ "Win32->rel2abs('temp','C:/a/')", 'C:\\a\\temp' ], -[ "Win32->rel2abs('../','C:/')", 'C:\\..' ], -[ "Win32->rel2abs('../','C:/a')", 'C:\\a\\..' ], -[ "Win32->rel2abs('temp','//prague_main/work/')", '\\\\prague_main\\work\\temp' ], -[ "Win32->rel2abs('../temp','//prague_main/work/')", '\\\\prague_main\\work\\..\\temp' ], -[ "Win32->rel2abs('temp','//prague_main/work')", '\\\\prague_main\\work\\temp' ], -[ "Win32->rel2abs('../','//prague_main/work')", '\\\\prague_main\\work\\..' ], - -[ "VMS->splitpath('file')", ',,file' ], -[ "VMS->splitpath('[d1.d2.d3]')", ',[d1.d2.d3],' ], -[ "VMS->splitpath('[.d1.d2.d3]')", ',[.d1.d2.d3],' ], -[ "VMS->splitpath('[d1.d2.d3]file')", ',[d1.d2.d3],file' ], -[ "VMS->splitpath('d1/d2/d3/file')", ',[.d1.d2.d3],file' ], -[ "VMS->splitpath('/d1/d2/d3/file')", 'd1:,[d2.d3],file' ], -[ "VMS->splitpath('[.d1.d2.d3]file')", ',[.d1.d2.d3],file' ], -[ "VMS->splitpath('node::volume:[d1.d2.d3]')", 'node::volume:,[d1.d2.d3],' ], -[ "VMS->splitpath('node::volume:[d1.d2.d3]file')", 'node::volume:,[d1.d2.d3],file' ], -[ "VMS->splitpath('node\"access_spec\"::volume:[d1.d2.d3]')", 'node"access_spec"::volume:,[d1.d2.d3],' ], -[ "VMS->splitpath('node\"access_spec\"::volume:[d1.d2.d3]file')", 'node"access_spec"::volume:,[d1.d2.d3],file' ], - -[ "VMS->catpath('','','file')", 'file' ], -[ "VMS->catpath('','[d1.d2.d3]','')", '[d1.d2.d3]' ], -[ "VMS->catpath('','[.d1.d2.d3]','')", '[.d1.d2.d3]' ], -[ "VMS->catpath('','[d1.d2.d3]','file')", '[d1.d2.d3]file' ], -[ "VMS->catpath('','[.d1.d2.d3]','file')", '[.d1.d2.d3]file' ], -[ "VMS->catpath('','d1/d2/d3','file')", '[.d1.d2.d3]file' ], -[ "VMS->catpath('v','d1/d2/d3','file')", 'v:[.d1.d2.d3]file' ], -[ "VMS->catpath('node::volume:','[d1.d2.d3]','')", 'node::volume:[d1.d2.d3]' ], -[ "VMS->catpath('node::volume:','[d1.d2.d3]','file')", 'node::volume:[d1.d2.d3]file' ], -[ "VMS->catpath('node\"access_spec\"::volume:','[d1.d2.d3]','')", 'node"access_spec"::volume:[d1.d2.d3]' ], -[ "VMS->catpath('node\"access_spec\"::volume:','[d1.d2.d3]','file')", 'node"access_spec"::volume:[d1.d2.d3]file' ], - -[ "VMS->canonpath('')", '' ], -[ "VMS->canonpath('volume:[d1]file')", 'volume:[d1]file' ], -[ "VMS->canonpath('volume:[d1.-.d2.][d3.d4.-]')", 'volume:[d2.d3]' ], -[ "VMS->canonpath('volume:[000000.d1]d2.dir;1')", 'volume:[d1]d2.dir;1' ], - -[ "VMS->splitdir('')", '' ], -[ "VMS->splitdir('[]')", '' ], -[ "VMS->splitdir('d1.d2.d3')", 'd1,d2,d3' ], -[ "VMS->splitdir('[d1.d2.d3]')", 'd1,d2,d3' ], -[ "VMS->splitdir('.d1.d2.d3')", ',d1,d2,d3' ], -[ "VMS->splitdir('[.d1.d2.d3]')", ',d1,d2,d3' ], -[ "VMS->splitdir('.-.d2.d3')", ',-,d2,d3' ], -[ "VMS->splitdir('[.-.d2.d3]')", ',-,d2,d3' ], - -[ "VMS->catdir('')", '' ], -[ "VMS->catdir('d1','d2','d3')", '[.d1.d2.d3]' ], -[ "VMS->catdir('d1','d2/','d3')", '[.d1.d2.d3]' ], -[ "VMS->catdir('','d1','d2','d3')", '[.d1.d2.d3]' ], -[ "VMS->catdir('','-','d2','d3')", '[-.d2.d3]' ], -[ "VMS->catdir('','-','','d3')", '[-.d3]' ], -[ "VMS->catdir('dir.dir','d2.dir','d3.dir')", '[.dir.d2.d3]' ], -[ "VMS->catdir('[.name]')", '[.name]' ], -[ "VMS->catdir('[.name]','[.name]')", '[.name.name]'], - -[ "VMS->abs2rel('node::volume:[t1.t2.t3]','[t1.t2.t3]')", '' ], -[ "VMS->abs2rel('node::volume:[t1.t2.t4]','[t1.t2.t3]')", '[-.t4]' ], -[ "VMS->abs2rel('[t1.t2.t3]','[t1.t2.t3]')", '' ], -[ "VMS->abs2rel('[t1.t2.t3]file','[t1.t2.t3]')", 'file' ], -[ "VMS->abs2rel('[t1.t2.t4]','[t1.t2.t3]')", '[-.t4]' ], -[ "VMS->abs2rel('[t1.t2]file','[t1.t2.t3]')", '[-]file' ], -[ "VMS->abs2rel('[t1.t2.t3.t4]','[t1.t2.t3]')", '[t4]' ], -[ "VMS->abs2rel('[t4.t5.t6]','[t1.t2.t3]')", '[---.t4.t5.t6]' ], -[ "VMS->abs2rel('[000000]','[t1.t2.t3]')", '[---.000000]' ], -[ "VMS->abs2rel('a:[t1.t2.t4]','[t1.t2.t3]')", '[-.t4]' ], -[ "VMS->abs2rel('[a.-.b.c.-]','[t1.t2.t3]')", '[---.b]' ], - -[ "VMS->rel2abs('[.t4]','[t1.t2.t3]')", '[t1.t2.t3.t4]' ], -[ "VMS->rel2abs('[.t4.t5]','[t1.t2.t3]')", '[t1.t2.t3.t4.t5]' ], -[ "VMS->rel2abs('[]','[t1.t2.t3]')", '[t1.t2.t3]' ], -[ "VMS->rel2abs('[-]','[t1.t2.t3]')", '[t1.t2]' ], -[ "VMS->rel2abs('[-.t4]','[t1.t2.t3]')", '[t1.t2.t4]' ], -[ "VMS->rel2abs('[t1]','[t1.t2.t3]')", '[t1]' ], - -[ "OS2->catdir('A:/d1','B:/d2','d3','')", 'A:/d1/B:/d2/d3' ], -[ "OS2->catfile('a','b','c')", 'a/b/c' ], - -[ "Mac->splitpath('file')", ',,file' ], -[ "Mac->splitpath(':file')", ',:,file' ], -[ "Mac->splitpath(':d1',1)", ',:d1:,' ], -[ "Mac->splitpath('d1',1)", 'd1:,,' ], -[ "Mac->splitpath('d1:d2:d3:')", 'd1:,d2:d3:,' ], -[ "Mac->splitpath('d1:d2:d3',1)", 'd1:,d2:d3:,' ], -[ "Mac->splitpath(':d1:d2:d3:')", ',:d1:d2:d3:,' ], -[ "Mac->splitpath(':d1:d2:d3:',1)", ',:d1:d2:d3:,' ], -[ "Mac->splitpath('d1:d2:d3:file')", 'd1:,d2:d3:,file' ], -[ "Mac->splitpath('d1:d2:d3',1)", 'd1:,d2:d3:,' ], - -[ "Mac->catdir('')", ':' ], -[ "Mac->catdir('d1','d2','d3')", 'd1:d2:d3:' ], -[ "Mac->catdir('d1','d2/','d3')", 'd1:d2/:d3:' ], -[ "Mac->catdir('','d1','d2','d3')", ':d1:d2:d3:' ], -[ "Mac->catdir('','','d2','d3')", '::d2:d3:' ], -[ "Mac->catdir('','','','d3')", ':::d3:' ], -[ "Mac->catdir(':name')", ':name:' ], -[ "Mac->catdir(':name',':name')", ':name:name:' ], - -[ "Mac->catfile('a','b','c')", 'a:b:c' ], - -[ "Mac->canonpath('')", '' ], -[ "Mac->canonpath(':')", ':' ], -[ "Mac->canonpath('::')", '::' ], -[ "Mac->canonpath('a::')", 'a::' ], -[ "Mac->canonpath(':a::')", ':a::' ], - -[ "Mac->abs2rel('t1:t2:t3','t1:t2:t3')", ':' ], -[ "Mac->abs2rel('t1:t2','t1:t2:t3')", '::' ], -[ "Mac->abs2rel('t1:t4','t1:t2:t3')", ':::t4' ], -[ "Mac->abs2rel('t1:t2:t4','t1:t2:t3')", '::t4' ], -[ "Mac->abs2rel('t1:t2:t3:t4','t1:t2:t3')", ':t4' ], -[ "Mac->abs2rel('t4:t5:t6','t1:t2:t3')", '::::t4:t5:t6' ], -[ "Mac->abs2rel('t1','t1:t2:t3')", ':::' ], - -[ "Mac->rel2abs(':t4','t1:t2:t3')", 't1:t2:t3:t4' ], -[ "Mac->rel2abs(':t4:t5','t1:t2:t3')", 't1:t2:t3:t4:t5' ], -[ "Mac->rel2abs('','t1:t2:t3')", '' ], -[ "Mac->rel2abs('::','t1:t2:t3')", 't1:t2:t3::' ], -[ "Mac->rel2abs('::t4','t1:t2:t3')", 't1:t2:t3::t4' ], -[ "Mac->rel2abs('t1','t1:t2:t3')", 't1' ], -) ; - -# Grab all of the plain routines from File::Spec -use File::Spec @File::Spec::EXPORT_OK ; - -require File::Spec::Unix ; -require File::Spec::Win32 ; - -eval { - require VMS::Filespec ; -} ; - -my $skip_exception = "Install VMS::Filespec (from vms/ext)" ; - -if ( $@ ) { - # Not pretty, but it allows testing of things not implemented soley - # on VMS. It might be better to change File::Spec::VMS to do this, - # making it more usable when running on (say) Unix but working with - # VMS paths. - eval qq- - sub File::Spec::VMS::vmsify { die "$skip_exception" } - sub File::Spec::VMS::unixify { die "$skip_exception" } - sub File::Spec::VMS::vmspath { die "$skip_exception" } - - ; - $INC{"VMS/Filespec.pm"} = 1 ; -} -require File::Spec::VMS ; - -require File::Spec::OS2 ; -require File::Spec::Mac ; - -print "1..", scalar( @tests ), "\n" ; - -my $current_test= 1 ; - -# Test out the class methods -for ( @tests ) { - tryfunc( @$_ ) ; -} - - - -# -# Tries a named function with the given args and compares the result against -# an expected result. Works with functions that return scalars or arrays. -# -sub tryfunc { - my $function = shift ; - my $expected = shift ; - my $platform = shift ; - - if ($platform && $^O ne $platform) { - print "ok $current_test # skipped: $function\n" ; - ++$current_test ; - return; - } - - $function =~ s#\\#\\\\#g ; - - my $got ; - if ( $function =~ /^[^\$].*->/ ) { - $got = eval( "join( ',', File::Spec::$function )" ) ; - } - else { - $got = eval( "join( ',', $function )" ) ; - } - - if ( $@ ) { - if ( substr( $@, 0, length $skip_exception ) eq $skip_exception ) { - chomp $@ ; - print "ok $current_test # skip $function: $@\n" ; - } - else { - chomp $@ ; - print "not ok $current_test # $function: $@\n" ; - } - } - elsif ( !defined( $got ) || $got ne $expected ) { - print "not ok $current_test # $function: got '$got', expected '$expected'\n" ; - } - else { - print "ok $current_test # $function\n" ; - } - ++$current_test ; -} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de