This is an automated email from the git hooks/post-receive script. dom pushed a commit to branch master in repository libcache-perl.
commit a00b5567cf0269023203407bcc0cffbb1137f46f Author: Dominic Hargreaves <d...@earth.li> Date: Sun Feb 2 15:40:11 2014 +0000 Imported Upstream version 2.08 --- Build.PL | 61 +++++++ Changes | 38 +++++ MANIFEST | 49 +++++- MANIFEST.SKIP | 9 + META.json | 126 ++++++++++++++ META.yml | 113 ++++++++++--- Makefile.PL | 25 --- README | 9 +- inc/Devel/AssertOS.pm | 104 ++++++++++++ inc/Devel/AssertOS/AIX.pm | 22 +++ inc/Devel/AssertOS/BSDOS.pm | 22 +++ inc/Devel/AssertOS/DGUX.pm | 22 +++ inc/Devel/AssertOS/DragonflyBSD.pm | 22 +++ inc/Devel/AssertOS/Dynix.pm | 22 +++ inc/Devel/AssertOS/FreeBSD.pm | 22 +++ inc/Devel/AssertOS/HPUX.pm | 22 +++ inc/Devel/AssertOS/Interix.pm | 22 +++ inc/Devel/AssertOS/Irix.pm | 22 +++ inc/Devel/AssertOS/Linux.pm | 22 +++ inc/Devel/AssertOS/MacOSX.pm | 22 +++ inc/Devel/AssertOS/MachTen.pm | 29 ++++ inc/Devel/AssertOS/MidnightBSD.pm | 20 +++ inc/Devel/AssertOS/MirOSBSD.pm | 22 +++ inc/Devel/AssertOS/NetBSD.pm | 22 +++ inc/Devel/AssertOS/OSF.pm | 24 +++ inc/Devel/AssertOS/OpenBSD.pm | 22 +++ inc/Devel/AssertOS/QNX.pm | 28 ++++ inc/Devel/AssertOS/QNX/Neutrino.pm | 24 +++ inc/Devel/AssertOS/QNX/v4.pm | 24 +++ inc/Devel/AssertOS/SCO.pm | 22 +++ inc/Devel/AssertOS/Solaris.pm | 22 +++ inc/Devel/AssertOS/SunOS.pm | 22 +++ inc/Devel/AssertOS/SysVr4.pm | 22 +++ inc/Devel/AssertOS/SysVr5.pm | 22 +++ inc/Devel/AssertOS/Unicos.pm | 22 +++ inc/Devel/AssertOS/Unix.pm | 40 +++++ inc/Devel/CheckOS.pm | 335 +++++++++++++++++++++++++++++++++++++ inc/Test/Run/Builder.pm | 76 +++++++++ lib/Cache.pm | 16 +- lib/Cache/Entry.pm | 4 +- lib/Cache/File.pm | 10 +- lib/Cache/File/Entry.pm | 8 +- lib/Cache/File/Heap.pm | 2 +- lib/Cache/IOString.pm | 2 +- lib/Cache/Memory.pm | 25 ++- lib/Cache/Memory/Entry.pm | 4 +- lib/Cache/Null.pm | 2 +- lib/Cache/Null/Entry.pm | 2 +- lib/Cache/RemovalStrategy.pm | 4 +- lib/Cache/Tester.pm | 13 +- scripts/bump-version-number.pl | 35 ++++ t/memory_set_namespace_rt32339.t | 21 +++ t/pod.t | 6 + t/style-trailing-space.t | 29 ++++ 54 files changed, 1664 insertions(+), 93 deletions(-) diff --git a/Build.PL b/Build.PL new file mode 100644 index 0000000..f6e98f6 --- /dev/null +++ b/Build.PL @@ -0,0 +1,61 @@ +use strict; +use warnings; + +use lib "./inc"; +use Devel::AssertOS qw(Unix); + +use Test::Run::Builder; + +my $builder = Test::Run::Builder->new( + module_name => 'Cache', + license => 'perl', + dist_author => 'Chris Leishman <ch...@leishman.org>', + dist_version_from => 'lib/Cache.pm', + dist_abstract => "Provide a generic Cache mechanism.", + requires => + { + 'DB_File' => '1.72', + 'Date::Parse' => '2.24', + 'Digest::SHA1' => '2.01', + 'Fcntl' => '1.03', + 'File::Find' => '0', + 'File::NFSLock' => '1.20', + 'File::Path' => '1.00', + 'File::Spec' => '0.8', + 'Heap::Fibonacci' => '0.01', + 'IO::File' => '1.08', + 'IO::Handle' => '1.21', + 'IO::String' => '1.02', + 'Storable' => '1.00', + 'Symbol' => '1.02', + 'Test::More' => '0.45', + 'perl' => '5.006', + }, + configure_requires => + { + 'Module::Build' => 0, + }, + add_to_cleanup => [ 'Cache-*' ], + meta_merge => + { + resources => + { + repository => "http://bitbucket.org/shlomif/web-cpan", + }, + keywords => + [ + 'cache', + 'caching', + 'file', + 'generic', + 'memory', + 'optimisation', + 'optimise', + 'optimization', + 'optimize', + 'speed', + ], + }, +); + +$builder->create_build_script(); diff --git a/Changes b/Changes index 802cbb3..afecdb8 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,41 @@ +2014-01-26 + - Convert from use "warnings::register;" to "use warnings;". + - Bugfix/maintenace release (2.08) + +2014-01-26 + - Add perl to the prereq in META.yml/META.json + - Kwalitee / CPANTS + - Bugfix/maintenace release (2.07) + +2013-09-13 + - Increase the delay of the cache invalidation in the tests by default to + avoid test failures due to high load. + - https://rt.cpan.org/Public/Bug/Display.html?id=27280 + - One can set the PERL_CACHE_PM_TESTING environment variable to a true + value to set it back at a quicker-to-run 1 second delay. + - Thanks to ANDK for reporting it. + - Fix Bug in Cache::Memory regarding Namespaces + - https://rt.cpan.org/Ticket/Display.html?id=32339 . + - ->set after ->set_namespace failed. + - Thanks to jus...@techadvise.com for the report and for a proposed + fix. + - Get rid of trailing space. + - Add t/style-trailing-space.t + - Bugfix/maintenance release (2.06) + +2013-09-05 + - Add t/pod.t and got the embedded PODs to validate. + - Convert the Build system to Module-Build. + - Fix https://rt.cpan.org/Ticket/Display.html?id=78817 + - Fix a warning for lc called with undef value + when "-w" is specified - during some tests. + - Tests fail or get stuck on Windows - use Devel::AssertOS to make sure + we don't build there. + - https://rt.cpan.org/Ticket/Display.html?id=81386 + - if a kind soul will fix the tests and/or the code on MSWin, we will + remove it. + - Bugfix/maintenance release (2.05) + 2006-02-01 - Bugfix release (2.04) - Fix for failure to call load_callback when verify_callback diff --git a/MANIFEST b/MANIFEST index 4f22ce0..53f0d49 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,11 +1,36 @@ +Build.PL Changes -LICENSE -MANIFEST -MANIFEST.SKIP -Makefile.PL -README -TODO design.dia +inc/Devel/AssertOS.pm +inc/Devel/AssertOS/AIX.pm +inc/Devel/AssertOS/BSDOS.pm +inc/Devel/AssertOS/DGUX.pm +inc/Devel/AssertOS/DragonflyBSD.pm +inc/Devel/AssertOS/Dynix.pm +inc/Devel/AssertOS/FreeBSD.pm +inc/Devel/AssertOS/HPUX.pm +inc/Devel/AssertOS/Interix.pm +inc/Devel/AssertOS/Irix.pm +inc/Devel/AssertOS/Linux.pm +inc/Devel/AssertOS/MachTen.pm +inc/Devel/AssertOS/MacOSX.pm +inc/Devel/AssertOS/MidnightBSD.pm +inc/Devel/AssertOS/MirOSBSD.pm +inc/Devel/AssertOS/NetBSD.pm +inc/Devel/AssertOS/OpenBSD.pm +inc/Devel/AssertOS/OSF.pm +inc/Devel/AssertOS/QNX.pm +inc/Devel/AssertOS/QNX/Neutrino.pm +inc/Devel/AssertOS/QNX/v4.pm +inc/Devel/AssertOS/SCO.pm +inc/Devel/AssertOS/Solaris.pm +inc/Devel/AssertOS/SunOS.pm +inc/Devel/AssertOS/SysVr4.pm +inc/Devel/AssertOS/SysVr5.pm +inc/Devel/AssertOS/Unicos.pm +inc/Devel/AssertOS/Unix.pm +inc/Devel/CheckOS.pm +inc/Test/Run/Builder.pm lib/Cache.pm lib/Cache/Entry.pm lib/Cache/File.pm @@ -22,6 +47,13 @@ lib/Cache/RemovalStrategy.pm lib/Cache/RemovalStrategy/FIFO.pm lib/Cache/RemovalStrategy/LRU.pm lib/Cache/Tester.pm +LICENSE +MANIFEST +MANIFEST.SKIP +META.json +META.yml Module meta-data (added by MakeMaker) +README +scripts/bump-version-number.pl t/00basic.t t/01fileheap.t t/file.t @@ -31,6 +63,9 @@ t/file_tie.t t/memory.t t/memory_fifo.t t/memory_lru.t +t/memory_set_namespace_rt32339.t t/memory_tie.t t/null.t -META.yml Module meta-data (added by MakeMaker) +t/pod.t +t/style-trailing-space.t +TODO diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index 9b291f0..c280bd2 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -1,8 +1,17 @@ +^_build/ +^Build$ \bCVS\b ^Makefile$ ^Makefile.old$ ^MANIFEST.bak$ ^blib/ +^\.git/ +^Cache-\d pm_to_blib .cvsignore .swp$ +~$ +^\.gitignore$ +^MYMETA\.yml$ +^MYMETA\.json$ +^tags$ diff --git a/META.json b/META.json new file mode 100644 index 0000000..07fee07 --- /dev/null +++ b/META.json @@ -0,0 +1,126 @@ +{ + "abstract" : "Provide a generic Cache mechanism.", + "author" : [ + "Chris Leishman <ch...@leishman.org>" + ], + "dynamic_config" : 1, + "generated_by" : "Module::Build version 0.4007, CPAN::Meta::Converter version 2.132830", + "keywords" : [ + "cache", + "caching", + "file", + "generic", + "memory", + "optimisation", + "optimise", + "optimization", + "optimize", + "speed" + ], + "license" : [ + "perl_5" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "Cache", + "prereqs" : { + "configure" : { + "requires" : { + "Module::Build" : "0" + } + }, + "runtime" : { + "requires" : { + "DB_File" : "1.72", + "Date::Parse" : "2.24", + "Digest::SHA1" : "2.01", + "Fcntl" : "1.03", + "File::Find" : "0", + "File::NFSLock" : "1.20", + "File::Path" : "1.00", + "File::Spec" : "0.8", + "Heap::Fibonacci" : "0.01", + "IO::File" : "1.08", + "IO::Handle" : "1.21", + "IO::String" : "1.02", + "Storable" : "1.00", + "Symbol" : "1.02", + "Test::More" : "0.45", + "perl" : "5.006" + } + } + }, + "provides" : { + "Cache" : { + "file" : "lib/Cache.pm", + "version" : "2.08" + }, + "Cache::Entry" : { + "file" : "lib/Cache/Entry.pm", + "version" : "2.08" + }, + "Cache::File" : { + "file" : "lib/Cache/File.pm", + "version" : "2.08" + }, + "Cache::File::Entry" : { + "file" : "lib/Cache/File/Entry.pm", + "version" : "2.08" + }, + "Cache::File::Handle" : { + "file" : "lib/Cache/File/Handle.pm" + }, + "Cache::File::Heap" : { + "file" : "lib/Cache/File/Heap.pm", + "version" : "2.08" + }, + "Cache::IOString" : { + "file" : "lib/Cache/IOString.pm" + }, + "Cache::Memory" : { + "file" : "lib/Cache/Memory.pm", + "version" : "2.08" + }, + "Cache::Memory::Entry" : { + "file" : "lib/Cache/Memory/Entry.pm", + "version" : "2.08" + }, + "Cache::Memory::HeapElem" : { + "file" : "lib/Cache/Memory/HeapElem.pm" + }, + "Cache::Null" : { + "file" : "lib/Cache/Null.pm", + "version" : "2.08" + }, + "Cache::Null::Entry" : { + "file" : "lib/Cache/Null/Entry.pm", + "version" : "2.08" + }, + "Cache::RemovalStrategy" : { + "file" : "lib/Cache/RemovalStrategy.pm", + "version" : "2.08" + }, + "Cache::RemovalStrategy::FIFO" : { + "file" : "lib/Cache/RemovalStrategy/FIFO.pm" + }, + "Cache::RemovalStrategy::LRU" : { + "file" : "lib/Cache/RemovalStrategy/LRU.pm" + }, + "Cache::Tester" : { + "file" : "lib/Cache/Tester.pm", + "version" : "2.08" + } + }, + "release_status" : "stable", + "resources" : { + "license" : [ + "http://dev.perl.org/licenses/" + ], + "repository" : { + "url" : "http://bitbucket.org/shlomif/web-cpan" + } + }, + "version" : "2.08" +} diff --git a/META.yml b/META.yml index 7395986..920f147 100644 --- a/META.yml +++ b/META.yml @@ -1,25 +1,90 @@ -# http://module-build.sourceforge.net/META-spec.html -#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# -name: Cache -version: 2.04 -version_from: lib/Cache.pm -installdirs: site +--- +abstract: 'Provide a generic Cache mechanism.' +author: + - 'Chris Leishman <ch...@leishman.org>' +build_requires: {} +configure_requires: + Module::Build: 0 +dynamic_config: 1 +generated_by: 'Module::Build version 0.4007, CPAN::Meta::Converter version 2.132830' +keywords: + - cache + - caching + - file + - generic + - memory + - optimisation + - optimise + - optimization + - optimize + - speed +license: perl +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: 1.4 +name: Cache +provides: + Cache: + file: lib/Cache.pm + version: 2.08 + Cache::Entry: + file: lib/Cache/Entry.pm + version: 2.08 + Cache::File: + file: lib/Cache/File.pm + version: 2.08 + Cache::File::Entry: + file: lib/Cache/File/Entry.pm + version: 2.08 + Cache::File::Handle: + file: lib/Cache/File/Handle.pm + Cache::File::Heap: + file: lib/Cache/File/Heap.pm + version: 2.08 + Cache::IOString: + file: lib/Cache/IOString.pm + Cache::Memory: + file: lib/Cache/Memory.pm + version: 2.08 + Cache::Memory::Entry: + file: lib/Cache/Memory/Entry.pm + version: 2.08 + Cache::Memory::HeapElem: + file: lib/Cache/Memory/HeapElem.pm + Cache::Null: + file: lib/Cache/Null.pm + version: 2.08 + Cache::Null::Entry: + file: lib/Cache/Null/Entry.pm + version: 2.08 + Cache::RemovalStrategy: + file: lib/Cache/RemovalStrategy.pm + version: 2.08 + Cache::RemovalStrategy::FIFO: + file: lib/Cache/RemovalStrategy/FIFO.pm + Cache::RemovalStrategy::LRU: + file: lib/Cache/RemovalStrategy/LRU.pm + Cache::Tester: + file: lib/Cache/Tester.pm + version: 2.08 requires: - Date::Parse: 2.24 - DB_File: 1.72 - Digest::SHA1: 2.01 - Fcntl: 1.03 - File::Find: 0 - File::NFSLock: 1.2 - File::Path: 1 - File::Spec: 0.8 - Heap::Fibonacci: 0.01 - IO::File: 1.08 - IO::Handle: 1.21 - IO::String: 1.02 - Storable: 1 - Symbol: 1.02 - Test::More: 0.45 - -distribution_type: module -generated_by: ExtUtils::MakeMaker version 6.17 + DB_File: 1.72 + Date::Parse: 2.24 + Digest::SHA1: 2.01 + Fcntl: 1.03 + File::Find: 0 + File::NFSLock: 1.20 + File::Path: 1.00 + File::Spec: 0.8 + Heap::Fibonacci: 0.01 + IO::File: 1.08 + IO::Handle: 1.21 + IO::String: 1.02 + Storable: 1.00 + Symbol: 1.02 + Test::More: 0.45 + perl: 5.006 +resources: + license: http://dev.perl.org/licenses/ + repository: http://bitbucket.org/shlomif/web-cpan +version: 2.08 diff --git a/Makefile.PL b/Makefile.PL deleted file mode 100644 index 519ac8d..0000000 --- a/Makefile.PL +++ /dev/null @@ -1,25 +0,0 @@ -use ExtUtils::MakeMaker; -# See lib/ExtUtils/MakeMaker.pm for details of how to influence -# the contents of the Makefile that is written. -WriteMakefile( - 'NAME' => 'Cache', - 'VERSION_FROM' => 'lib/Cache.pm', # finds $VERSION - 'AUTHOR' => 'Chris Leishman <ch...@leishman.org>', - 'PREREQ_PM' => { - Storable => 1.00, - Date::Parse => 2.24, - Test::More => 0.45, - Heap::Fibonacci => 0.01, - IO::String => 1.02, - File::Find => 0, # any version - File::Spec => 0.8, - File::Path => 1.00, - File::NFSLock => 1.20, - Digest::SHA1 => 2.01, - Symbol => 1.02, - IO::Handle => 1.21, - IO::File => 1.08, - Fcntl => 1.03, - DB_File => 1.72, - }, -); diff --git a/README b/README index 8b19f2f..cca438e 100644 --- a/README +++ b/README @@ -23,7 +23,12 @@ To install: will probably do it. -Please send any bug reports to Chris Leishman <ch...@leishman.org>. -Messages of thanks are also appreciated :) +Please send any bug reports to the rt.cpan.org queue at +https://rt.cpan.org/Dist/Display.html?Name=Cache . + +This module was originally created by Chris Leishman <ch...@leishman.org> +and is now maintained by Shlomi Fish ( http://www.shlomifish.org/ ). + +Messages of thanks can be sent by E-mail. :) Enjoy! diff --git a/inc/Devel/AssertOS.pm b/inc/Devel/AssertOS.pm new file mode 100644 index 0000000..5b851a0 --- /dev/null +++ b/inc/Devel/AssertOS.pm @@ -0,0 +1,104 @@ +package # +Devel::AssertOS; + +use Devel::CheckOS; + +use strict; + +use vars qw($VERSION); + +$VERSION = '1.21'; + +# localising prevents the warningness leaking out of this module +local $^W = 1; # use warnings is a 5.6-ism + +=head1 NAME + +Devel::AssertOS - require that we are running on a particular OS + +=head1 DESCRIPTION + +Devel::AssertOS is a utility module for Devel::CheckOS and +Devel::AssertOS::*. It is nothing but a magic C<import()> that lets you +do this: + + use Devel::AssertOS qw(Linux FreeBSD Cygwin); + +which will die unless the platform the code is running on is Linux, FreeBSD +or Cygwin. + +To assert that the OS is B<not> a specific platform, prepend the platform name +with a minus sign. For example, to run on anything but Amiga, do: + + use Devel::AssertOS qw(-Amiga); + + +=cut + +sub import { + shift; + die("Devel::AssertOS needs at least one parameter\n") unless(@_); + + my @oses = @_; + + my ( @must, @must_not ); + + for my $os ( @oses ) { + if ( $os =~ s/^-// ) { + push @must_not, $os; + } + else { + push @must, $os; + } + } + + Devel::CheckOS::die_if_os_is(@must_not) if @must_not; + Devel::CheckOS::die_if_os_isnt(@must) if @must; +} + +=head1 BUGS and FEEDBACK + +I welcome feedback about my code, including constructive criticism. +Bug reports should be made using L<http://rt.cpan.org/> or by email. + +You will need to include in your bug report the exact value of $^O, what +the OS is called (eg Windows Vista 64 bit Ultimate Home Edition), and, +if relevant, what "OS family" it should be in and who wrote it. + +If you are feeling particularly generous you can encourage me in my +open source endeavours by buying me something from my wishlist: + L<http://www.cantrell.org.uk/david/wishlist/> + +=head1 SEE ALSO + +$^O in L<perlvar> + +L<perlport> + +L<Devel::CheckOS> + +L<Devel::AssertOS::Extending> + +The use-devel-assertos script + +L<Module::Install::AssertOS> + +=head1 AUTHOR + +David Cantrell E<lt>F<da...@cantrell.org.uk>E<gt> + +Thanks to David Golden for suggesting that I add this utility module. + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=head1 CONSPIRACY + +This module is also free-as-in-mason software. + +=cut + +$^O; diff --git a/inc/Devel/AssertOS/AIX.pm b/inc/Devel/AssertOS/AIX.pm new file mode 100644 index 0000000..09e7f0d --- /dev/null +++ b/inc/Devel/AssertOS/AIX.pm @@ -0,0 +1,22 @@ +# $Id: AIX.pm,v 1.3 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::AIX; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'aix' ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/BSDOS.pm b/inc/Devel/AssertOS/BSDOS.pm new file mode 100644 index 0000000..5c0e335 --- /dev/null +++ b/inc/Devel/AssertOS/BSDOS.pm @@ -0,0 +1,22 @@ +# $Id: BSDOS.pm,v 1.3 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::BSDOS; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'bsdos' ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/DGUX.pm b/inc/Devel/AssertOS/DGUX.pm new file mode 100644 index 0000000..a64a6a1 --- /dev/null +++ b/inc/Devel/AssertOS/DGUX.pm @@ -0,0 +1,22 @@ +# $Id: DGUX.pm,v 1.3 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::DGUX; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'dgux' ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/DragonflyBSD.pm b/inc/Devel/AssertOS/DragonflyBSD.pm new file mode 100644 index 0000000..5221f69 --- /dev/null +++ b/inc/Devel/AssertOS/DragonflyBSD.pm @@ -0,0 +1,22 @@ +# $Id: DragonflyBSD.pm,v 1.3 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::DragonflyBSD; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'dragonfly' ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/Dynix.pm b/inc/Devel/AssertOS/Dynix.pm new file mode 100644 index 0000000..054c695 --- /dev/null +++ b/inc/Devel/AssertOS/Dynix.pm @@ -0,0 +1,22 @@ +# $Id: Dynix.pm,v 1.3 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::Dynix; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'dynixptx' ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/FreeBSD.pm b/inc/Devel/AssertOS/FreeBSD.pm new file mode 100644 index 0000000..f436b92 --- /dev/null +++ b/inc/Devel/AssertOS/FreeBSD.pm @@ -0,0 +1,22 @@ +# $Id: FreeBSD.pm,v 1.5 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::FreeBSD; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O =~ /^(gnuk)?freebsd$/ ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/HPUX.pm b/inc/Devel/AssertOS/HPUX.pm new file mode 100644 index 0000000..0a3e0a0 --- /dev/null +++ b/inc/Devel/AssertOS/HPUX.pm @@ -0,0 +1,22 @@ +# $Id: HPUX.pm,v 1.3 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::HPUX; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'hpux' ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/Interix.pm b/inc/Devel/AssertOS/Interix.pm new file mode 100644 index 0000000..40901c8 --- /dev/null +++ b/inc/Devel/AssertOS/Interix.pm @@ -0,0 +1,22 @@ +# $Id: Interix.pm,v 1.3 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::Interix; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'interix' ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/Irix.pm b/inc/Devel/AssertOS/Irix.pm new file mode 100644 index 0000000..d301e59 --- /dev/null +++ b/inc/Devel/AssertOS/Irix.pm @@ -0,0 +1,22 @@ +# $Id: Irix.pm,v 1.3 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::Irix; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'irix' ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/Linux.pm b/inc/Devel/AssertOS/Linux.pm new file mode 100644 index 0000000..8f507d7 --- /dev/null +++ b/inc/Devel/AssertOS/Linux.pm @@ -0,0 +1,22 @@ +# $Id: Linux.pm,v 1.5 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::Linux; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'linux' ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/MacOSX.pm b/inc/Devel/AssertOS/MacOSX.pm new file mode 100644 index 0000000..69767a3 --- /dev/null +++ b/inc/Devel/AssertOS/MacOSX.pm @@ -0,0 +1,22 @@ +# $Id: MacOSX.pm,v 1.3 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::MacOSX; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'darwin' ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/MachTen.pm b/inc/Devel/AssertOS/MachTen.pm new file mode 100644 index 0000000..fe50d31 --- /dev/null +++ b/inc/Devel/AssertOS/MachTen.pm @@ -0,0 +1,29 @@ +# $Id: MachTen.pm,v 1.4 2008/11/05 22:52:34 drhyde Exp $ + +package # +Devel::AssertOS::MachTen; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'machten' ? 1 : 0; } + +sub expn { +join("\n", +"You're using the Mach Ten BSD-compatible environment on top of", +"Mac OS 'Classic' - ie, a pre-OS-X version of Mac OS.", +) +} + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/MidnightBSD.pm b/inc/Devel/AssertOS/MidnightBSD.pm new file mode 100644 index 0000000..19f93e0 --- /dev/null +++ b/inc/Devel/AssertOS/MidnightBSD.pm @@ -0,0 +1,20 @@ +package # +Devel::AssertOS::MidnightBSD; + +use Devel::CheckOS; + +$VERSION = '1.0'; + +sub os_is { $^O eq 'midnightbsd' ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/MirOSBSD.pm b/inc/Devel/AssertOS/MirOSBSD.pm new file mode 100644 index 0000000..2055d32 --- /dev/null +++ b/inc/Devel/AssertOS/MirOSBSD.pm @@ -0,0 +1,22 @@ +# $Id: MirOSBSD.pm,v 1.2 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::MirOSBSD; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'mirbsd' ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/NetBSD.pm b/inc/Devel/AssertOS/NetBSD.pm new file mode 100644 index 0000000..eeb10c8 --- /dev/null +++ b/inc/Devel/AssertOS/NetBSD.pm @@ -0,0 +1,22 @@ +# $Id: NetBSD.pm,v 1.3 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::NetBSD; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'netbsd' ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/OSF.pm b/inc/Devel/AssertOS/OSF.pm new file mode 100644 index 0000000..f8aa978 --- /dev/null +++ b/inc/Devel/AssertOS/OSF.pm @@ -0,0 +1,24 @@ +# $Id: OSF.pm,v 1.4 2008/11/05 22:52:34 drhyde Exp $ + +package # +Devel::AssertOS::OSF; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'dec_osf' ? 1 : 0; } + +sub expn { "OSF is also known as OSF/1, Digital Unix, and Tru64 Unix" } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/OpenBSD.pm b/inc/Devel/AssertOS/OpenBSD.pm new file mode 100644 index 0000000..9bd60de --- /dev/null +++ b/inc/Devel/AssertOS/OpenBSD.pm @@ -0,0 +1,22 @@ +# $Id: OpenBSD.pm,v 1.3 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::OpenBSD; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'openbsd' ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/QNX.pm b/inc/Devel/AssertOS/QNX.pm new file mode 100644 index 0000000..e0fc252 --- /dev/null +++ b/inc/Devel/AssertOS/QNX.pm @@ -0,0 +1,28 @@ +# $Id: QNX.pm,v 1.2 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::QNX; + +use Devel::CheckOS; + +$VERSION = '1.2'; + +sub matches { return qw(QNX::v4 QNX::Neutrino); } +sub os_is { Devel::CheckOS::os_is(matches()); } +sub expn { +join("\n", +"All versions of QNX match this, as well as (possibly) a more specific", +"match" +) +} +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/QNX/Neutrino.pm b/inc/Devel/AssertOS/QNX/Neutrino.pm new file mode 100644 index 0000000..848c880 --- /dev/null +++ b/inc/Devel/AssertOS/QNX/Neutrino.pm @@ -0,0 +1,24 @@ +# $Id: Neutrino.pm,v 1.3 2008/11/05 22:52:35 drhyde Exp $ + +package # +Devel::AssertOS::QNX::Neutrino; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'nto' ? 1 : 0; } + +sub expn { "The operating system is version 6 of QNX, also known as Neutrino" } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/QNX/v4.pm b/inc/Devel/AssertOS/QNX/v4.pm new file mode 100644 index 0000000..ca72014 --- /dev/null +++ b/inc/Devel/AssertOS/QNX/v4.pm @@ -0,0 +1,24 @@ +# $Id: v4.pm,v 1.3 2008/11/05 22:52:35 drhyde Exp $ + +package # +Devel::AssertOS::QNX::v4; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'qnx' ? 1 : 0; } + +sub expn { "The operating system is version 4 of QNX" } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/SCO.pm b/inc/Devel/AssertOS/SCO.pm new file mode 100644 index 0000000..80c2bfe --- /dev/null +++ b/inc/Devel/AssertOS/SCO.pm @@ -0,0 +1,22 @@ +# $Id: SCO.pm,v 1.3 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::SCO; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'sco_sv' ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/Solaris.pm b/inc/Devel/AssertOS/Solaris.pm new file mode 100644 index 0000000..a6291d6 --- /dev/null +++ b/inc/Devel/AssertOS/Solaris.pm @@ -0,0 +1,22 @@ +# $Id: Solaris.pm,v 1.3 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::Solaris; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'solaris' ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/SunOS.pm b/inc/Devel/AssertOS/SunOS.pm new file mode 100644 index 0000000..2466aad --- /dev/null +++ b/inc/Devel/AssertOS/SunOS.pm @@ -0,0 +1,22 @@ +# $Id: SunOS.pm,v 1.3 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::SunOS; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'sunos' ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/SysVr4.pm b/inc/Devel/AssertOS/SysVr4.pm new file mode 100644 index 0000000..352891e --- /dev/null +++ b/inc/Devel/AssertOS/SysVr4.pm @@ -0,0 +1,22 @@ +# $Id: SysVr4.pm,v 1.3 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::SysVr4; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'svr4' ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/SysVr5.pm b/inc/Devel/AssertOS/SysVr5.pm new file mode 100644 index 0000000..dea4d46 --- /dev/null +++ b/inc/Devel/AssertOS/SysVr5.pm @@ -0,0 +1,22 @@ +# $Id: SysVr5.pm,v 1.3 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::SysVr5; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O eq 'svr5' ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/Unicos.pm b/inc/Devel/AssertOS/Unicos.pm new file mode 100644 index 0000000..4afd071 --- /dev/null +++ b/inc/Devel/AssertOS/Unicos.pm @@ -0,0 +1,22 @@ +# $Id: Unicos.pm,v 1.3 2008/10/27 20:31:21 drhyde Exp $ + +package # +Devel::AssertOS::Unicos; + +use Devel::CheckOS; + +$VERSION = '1.1'; + +sub os_is { $^O =~ /^unicos(mk)?$/ ? 1 : 0; } + +Devel::CheckOS::die_unsupported() unless(os_is()); + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/AssertOS/Unix.pm b/inc/Devel/AssertOS/Unix.pm new file mode 100644 index 0000000..09ae4b5 --- /dev/null +++ b/inc/Devel/AssertOS/Unix.pm @@ -0,0 +1,40 @@ +# $Id: Unix.pm,v 1.9 2008/11/05 22:52:35 drhyde Exp $ + +package # +Devel::AssertOS::Unix; + +use Devel::CheckOS; + +$VERSION = '1.4'; + +# list of OSes lifted from Module::Build 0.2808 +# +sub matches { + return qw( + AIX BSDOS DGUX DragonflyBSD Dynix FreeBSD HPUX Interix Irix + Linux MachTen MacOSX MirOSBSD NetBSD OpenBSD OSF QNX SCO Solaris + SunOS SysVr4 SysVr5 Unicos MidnightBSD + ); +} +sub os_is { Devel::CheckOS::os_is(matches()); } +Devel::CheckOS::die_unsupported() unless(os_is()); + +sub expn { +join("\n", +"The OS supports multiple concurrent users, devices are represented as", +"pseudo-files in /dev, there is a single root to the filesystem, users", +"are protected from interference from other users, and the API is POSIXy.", +"It should be reasonably easy to port a simple text-mode C program", +"between Unixes." +) +} + +=head1 COPYRIGHT and LICENCE + +Copyright 2007 - 2008 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=cut + +1; diff --git a/inc/Devel/CheckOS.pm b/inc/Devel/CheckOS.pm new file mode 100644 index 0000000..a0d1a3a --- /dev/null +++ b/inc/Devel/CheckOS.pm @@ -0,0 +1,335 @@ +package # +Devel::CheckOS; + +use strict; +use Exporter; + +use vars qw($VERSION @ISA @EXPORT_OK %EXPORT_TAGS); + +$VERSION = '1.71'; + +# localising prevents the warningness leaking out of this module +local $^W = 1; # use warnings is a 5.6-ism + +@ISA = qw(Exporter); +@EXPORT_OK = qw(os_is os_isnt die_if_os_is die_if_os_isnt die_unsupported list_platforms list_family_members); +%EXPORT_TAGS = ( + all => \@EXPORT_OK, + booleans => [qw(os_is os_isnt die_unsupported)], + fatal => [qw(die_if_os_is die_if_os_isnt)] +); + +=head1 NAME + +Devel::CheckOS - check what OS we're running on + +=head1 DESCRIPTION + +A learned sage once wrote on IRC: + + $^O is stupid and ugly, it wears its pants as a hat + +Devel::CheckOS provides a more friendly interface to $^O, and also lets +you check for various OS "families" such as "Unix", which includes things +like Linux, Solaris, AIX etc. + +It spares perl the embarrassment of wearing its pants on its head by +covering them with a splendid Fedora. + +=head1 SYNOPSIS + + use Devel::CheckOS qw(os_is); + print "Hey, I know this, it's a Unix system\n" if(os_is('Unix')); + + print "You've got Linux 2.6\n" if(os_is('Linux::v2_6')); + +=head1 USING IT IN Makefile.PL or Build.PL + +If you want to use this from Makefile.PL or Build.PL, do +not simply copy the module into your distribution as this may cause +problems when PAUSE and search.cpan.org index the distro. Instead, use +the use-devel-assertos script. + +=head1 FUNCTIONS + +Devel::CheckOS implements the following functions, which load subsidiary +OS-specific modules on demand to do the real work. They can be exported +by listing their names after C<use Devel::CheckOS>. You can also export +groups of functions thus: + + use Devel::CheckOS qw(:booleans); # export the boolean functions + # and 'die_unsupported' + + use Devel::CheckOS qw(:fatal); # export those that die on no match + + use Devel::CheckOS qw(:all); # export everything + +=head2 Boolean functions + +=head3 os_is + +Takes a list of OS names. If the current platform matches any of them, +it returns true, otherwise it returns false. The names can be a mixture +of OSes and OS families, eg ... + + os_is(qw(Unix VMS)); # Unix is a family, VMS is an OS + +=cut + +sub os_is { + my @targets = @_; + my $rval = 0; + foreach my $target (@targets) { + die("Devel::CheckOS: $target isn't a legal OS name\n") + unless($target =~ /^\w+(::\w+)*$/); + eval "use Devel::AssertOS::$target"; + if(!$@) { + no strict 'refs'; + $rval = 1 if(&{"Devel::AssertOS::${target}::os_is"}()); + } + } + return $rval; +} + +=head3 os_isnt + +If the current platform matches any of the parameters it returns false, +otherwise it returns true. + +=cut + +sub os_isnt { + my @targets = @_; + my $rval = 1; + foreach my $target (@targets) { + $rval = 0 if(os_is($target)); + } + return $rval; +} + +=head2 Fatal functions + +=head3 die_if_os_isnt + +As C<os_is()>, except that it dies instead of returning false. The die() +message matches what the CPAN-testers look for to determine if a module +doesn't support a particular platform. + +=cut + +sub die_if_os_isnt { + os_is(@_) ? 1 : die_unsupported(); +} + +=head3 die_if_os_is + +As C<os_isnt()>, except that it dies instead of returning false. + +=cut + +sub die_if_os_is { + os_isnt(@_) ? 1 : die_unsupported(); +} + +=head2 And some utility functions ... + +=head3 die_unsupported + +This function simply dies with the message "OS unsupported", which is what +the CPAN testers look for to figure out whether a platform is supported or +not. + +=cut + +sub die_unsupported { die("OS unsupported\n"); } + +=head3 list_platforms + +When called in list context, +return a list of all the platforms for which the corresponding +Devel::AssertOS::* module is available. This includes both OSes and OS +families, and both those bundled with this module and any third-party +add-ons you have installed. + +In scalar context, returns a hashref keyed by platform with the filename +of the most recent version of the supporting module that is available to you. +This is to make sure that the use-devel-assertos script Does The Right Thing +in the case where you have installed the module in one version of perl, then +upgraded perl, and installed it again in the new version. Sometimes the old +version of perl and all its modules will still be hanging around and perl +"helpfully" includes the old perl's search path in its own. + +Unfortunately, on some platforms this list may have file case +broken. eg, some platforms might return 'freebsd' instead of 'FreeBSD'. +This is because they have case-insensitive filesystems so things +should Just Work anyway. + +=cut + +my ($re_Devel, $re_AssertOS); + +sub list_platforms { + eval " # only load these if needed + use File::Find::Rule; + use File::Spec; + "; + + die($@) if($@); + if (!$re_Devel) { + my $case_flag = File::Spec->case_tolerant ? '(?i)' : ''; + $re_Devel = qr/$case_flag ^Devel$/x; + $re_AssertOS = qr/$case_flag ^AssertOS$/x; + } + + # sort by mtime, so oldest last + my @modules = sort { + (stat($a->{file}))[9] <=> (stat($b->{file}))[9] + } map { + my (undef, $dir_part, $file_part) = File::Spec->splitpath($_); + $file_part =~ s/\.pm$//; + my (@dirs) = grep {+length} File::Spec->splitdir($dir_part); + foreach my $i (reverse 1..$#dirs) { + next unless $dirs[$i] =~ $re_AssertOS + && $dirs[$i - 1] =~ $re_Devel; + splice @dirs, 0, $i + 1; + last; + } + { + module => join('::', @dirs, $file_part), + file => File::Spec->canonpath($_) + } + } File::Find::Rule->file()->name('*.pm')->in( + grep { -d } + map { File::Spec->catdir($_, qw(Devel AssertOS)) } + @INC + ); + + my %modules = map { + $_->{module} => $_->{file} + } @modules; + + if(wantarray()) { + return sort keys %modules; + } else { + return \%modules; + } +} + +=head3 list_family_members + +Takes the name of an OS 'family' and returns a list of all its members. +In list context, you get a list, in scalar context you get an arrayref. + +If called on something that isn't a family, you get an empty list (or +a ref to an empty array). + +=cut + +sub list_family_members { + my $family = shift() || + die(__PACKAGE__."::list_family_members needs a parameter\n"); + + # this will die if it's the wrong OS, but the module is loaded ... + eval qq{use Devel::AssertOS::$family}; + # ... so we can now query it + my @members = eval qq{ + no strict 'refs'; + &{"Devel::AssertOS::${family}::matches"}() + }; + return wantarray() ? @members : \@members; +} + +=head1 PLATFORMS SUPPORTED + +To see the list of platforms for which information is available, run this: + + perl -MDevel::CheckOS -e 'print join(", ", Devel::CheckOS::list_platforms())' + +Note that capitalisation is important. These are the names of the +underlying Devel::AssertOS::* modules +which do the actual platform detection, so they have to +be 'legal' filenames and module names, which unfortunately precludes +funny characters, so platforms like OS/2 are mis-spelt deliberately. +Sorry. + +Also be aware that not all of them have been properly tested. I don't +have access to most of them and have had to work from information +gleaned from L<perlport> and a few other places. For a complete list of +OS families, see L<Devel::CheckOS::Families>. + +If you want to add your own OSes or families, see L<Devel::AssertOS::Extending> +and please feel free to upload the results to the CPAN. + +=head1 BUGS and FEEDBACK + +I welcome feedback about my code, including constructive criticism. +Bug reports should be made using L<http://rt.cpan.org/> or by email. + +You will need to include in your bug report the exact value of $^O, what +the OS is called (eg Windows Vista 64 bit Ultimate Home Edition), and, +if relevant, what "OS family" it should be in and who wrote it. + +If you are feeling particularly generous you can encourage me in my +open source endeavours by buying me something from my wishlist: + L<http://www.cantrell.org.uk/david/wishlist/> + +=head1 SEE ALSO + +$^O in L<perlvar> + +L<perlport> + +L<Devel::AssertOS> + +L<Devel::AssertOS::Extending> + +L<Probe::Perl> + +The use-devel-assertos script + +L<Module::Install::AssertOS> + +=head1 AUTHOR + +David Cantrell E<lt>F<da...@cantrell.org.uk>E<gt> + +Thanks to David Golden for the name and ideas about the interface, and +to the cpan-testers-discuss mailing list for prompting me to write it +in the first place. + +Thanks to Ken Williams, from whose L<Module::Build> I lifted some of the +information about what should be in the Unix family. + +Thanks to Billy Abbott for finding some bugs for me on VMS. + +Thanks to Matt Kraai for information about QNX. + +Thanks to Kenichi Ishigaki and Gabor Szabo for reporting a bug on Windows, +and to the former for providing a patch. + +Thanks to Paul Green for some information about VOS. + +Thanks to Yanick Champoux for a patch to let Devel::AssertOS support +negative assertions. + +=head1 SOURCE CODE REPOSITORY + +L<git://github.com/DrHyde/perl-modules-Devel-CheckOS.git> + +=head1 COPYRIGHT and LICENCE + +Copyright 2007-2012 David Cantrell + +This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. + +=head1 HATS + +I recommend buying a Fedora from L<http://hatsdirect.com/>. + +=head1 CONSPIRACY + +This module is also free-as-in-mason software. + +=cut + +1; diff --git a/inc/Test/Run/Builder.pm b/inc/Test/Run/Builder.pm new file mode 100644 index 0000000..773b47b --- /dev/null +++ b/inc/Test/Run/Builder.pm @@ -0,0 +1,76 @@ +package Test::Run::Builder; + +use strict; +use warnings; + +use Module::Build; + +use vars qw(@ISA); + +@ISA = (qw(Module::Build)); + +sub ACTION_runtest +{ + my ($self) = @_; + my $p = $self->{properties}; + + $self->depends_on('code'); + + local @INC = @INC; + + # Make sure we test the module in blib/ + unshift @INC, (File::Spec->catdir($p->{base_dir}, $self->blib, 'lib'), + File::Spec->catdir($p->{base_dir}, $self->blib, 'arch')); + + $self->do_test_run_tests; +} + +sub ACTION_distruntest { + my ($self) = @_; + + $self->depends_on('distdir'); + + my $start_dir = $self->cwd; + my $dist_dir = $self->dist_dir; + chdir $dist_dir or die "Cannot chdir to $dist_dir: $!"; + # XXX could be different names for scripts + + $self->run_perl_script('Build.PL') # XXX Should this be run w/ --nouse-rcfile + or die "Error executing 'Build.PL' in dist directory: $!"; + $self->run_perl_script('Build') + or die "Error executing 'Build' in dist directory: $!"; + $self->run_perl_script('Build', [], ['runtest']) + or die "Error executing 'Build test' in dist directory"; + chdir $start_dir; +} + +sub do_test_run_tests +{ + my $self = shift; + + require Test::Run::CmdLine::Iface; + + my $test_run = + Test::Run::CmdLine::Iface->new( + { + 'test_files' => [glob("t/*.t")], + } + # 'backend_params' => $self->_get_backend_params(), + ); + + return $test_run->run(); +} + +sub ACTION_tags +{ + return + system(qw( + ctags -f tags --recurse --totals + --exclude=blib/** --exclude=t/lib/** + --exclude=.svn --exclude='*~' + --languages=Perl --langmap=Perl:+.t + )); +} + +1; + diff --git a/lib/Cache.pm b/lib/Cache.pm index 6c0c4bb..465d4d0 100644 --- a/lib/Cache.pm +++ b/lib/Cache.pm @@ -45,7 +45,7 @@ package Cache; require 5.006; use strict; -use warnings::register; +use warnings; use Carp; use Date::Parse; @@ -54,7 +54,7 @@ use fields qw( default_expires removal_strategy size_limit load_callback validate_callback); -our $VERSION = '2.04'; +our $VERSION = '2.08'; our $EXPIRES_NOW = 'now'; our $EXPIRES_NEVER = 'never'; @@ -479,11 +479,19 @@ These methods are only for use internally (by concrete Cache implementations). Converts a timespec as described for Cache::Entry::set_expiry() into a unix time. +=back + =cut sub Canonicalize_Expiration_Time { - my $timespec = lc($_[0]) - or return undef; + my $timespec; + + my $timespec_param = shift(@_); + if (! $timespec_param) + { + return undef; + } + $timespec = lc($timespec_param); my $time; diff --git a/lib/Cache/Entry.pm b/lib/Cache/Entry.pm index ee4de22..63ef1d3 100644 --- a/lib/Cache/Entry.pm +++ b/lib/Cache/Entry.pm @@ -39,7 +39,7 @@ use Carp; use fields qw(cache key); -our $VERSION = '2.04'; +our $VERSION = '2.08'; sub new { @@ -230,7 +230,7 @@ that writers will have have an exclusive lock and readers a shared one. Thus the method get() (or obtaining another handle) should be avoided whilst a write handle is held. Using set() or remove(), however, should be supported. These clear the current entry and whilst they do not invalidate open handles, -those handle will from then on refer to old data and any changes to the data +those handle will from then on refer to old data and any changes to the data will be discarded. =cut diff --git a/lib/Cache/File.pm b/lib/Cache/File.pm index 11d7978..6e0fab3 100644 --- a/lib/Cache/File.pm +++ b/lib/Cache/File.pm @@ -41,7 +41,7 @@ use fields qw( expheap ageheap useheap index lockfile lock lockcount openexp openage openuse openidx); -our $VERSION = '2.04'; +our $VERSION = '2.08'; sub LOCK_NONE () { 0 } sub LOCK_LOCAL () { 1 } @@ -196,7 +196,7 @@ sub count { my $index = $self->get_index(); $count = $$index{$COUNT_KEY}; $self->unlock(); - + return $count || 0; } @@ -208,13 +208,13 @@ sub size { my $index = $self->get_index(); $size = $$index{$SIZE_KEY}; $self->unlock(); - + return $size || 0; } sub sync { my Cache::File $self = shift; - # TODO: check entries in cache root and rebuild heaps + # TODO: check entries in cache root and rebuild heaps } @@ -310,8 +310,6 @@ sub _set_cache_umask { Specify the level of locking to be used. There are three different levels available: -=over - =item Cache::File::LOCK_NONE() No locking is performed. Useful when you can guarantee only one process will diff --git a/lib/Cache/File/Entry.pm b/lib/Cache/File/Entry.pm index 9d2ed1e..0bfc76b 100644 --- a/lib/Cache/File/Entry.pm +++ b/lib/Cache/File/Entry.pm @@ -30,7 +30,7 @@ use Carp; use base qw(Cache::Entry); use fields qw(dir path lockdetails); -our $VERSION = '2.04'; +our $VERSION = '2.08'; # hash of locks held my the process, keyed on path. This is useful for # catching potential deadlocks and warning the user, and for implementing @@ -131,7 +131,7 @@ sub _get { my $time = time(); $cache->lock(); - + if ($exists = $self->exists()) { # update last used $cache->update_last_use($key, $time); @@ -417,7 +417,7 @@ sub _lock { my $path = $self->{path}; my $lock_details = $PROCESS_LOCKS{$path}; - + if ($lock_details) { if ($$lock_details{type} != $type) { $tryonly and return 0; @@ -441,7 +441,7 @@ sub _lock { lock_type => $type | ($tryonly? LOCK_NB : 0), stale_lock_timeout => $Cache::File::STALE_LOCK_TIMEOUT, }); - + unless ($lock) { umask $oldmask; $tryonly and return 0; diff --git a/lib/Cache/File/Heap.pm b/lib/Cache/File/Heap.pm index 1a5d9d5..64104b8 100644 --- a/lib/Cache/File/Heap.pm +++ b/lib/Cache/File/Heap.pm @@ -31,7 +31,7 @@ use Carp; use fields qw(db dbhash); -our $VERSION = '2.04'; +our $VERSION = '2.08'; # common info object my $BTREEINFO = new DB_File::BTREEINFO; diff --git a/lib/Cache/IOString.pm b/lib/Cache/IOString.pm index ceeda7b..3d73238 100644 --- a/lib/Cache/IOString.pm +++ b/lib/Cache/IOString.pm @@ -4,7 +4,7 @@ Cache::IOString - wrapper for IO::String to use in Cache implementations =head1 DESCRIPTION -This module implements a derived class of IO::String that handles access +This module implements a derived class of IO::String that handles access modes and allows callback on close. It is for use by Cache implementations and should not be used directly. diff --git a/lib/Cache/Memory.pm b/lib/Cache/Memory.pm index 192c2ab..6cc5a9a 100644 --- a/lib/Cache/Memory.pm +++ b/lib/Cache/Memory.pm @@ -34,7 +34,7 @@ use Cache::Memory::Entry; use base qw(Cache); use fields qw(namespace); -our $VERSION = '2.04'; +our $VERSION = '2.08'; # storage for all data @@ -79,6 +79,15 @@ available properties that can be set. =cut +sub _init_ns_heaps { + my ($self, $ns) = @_; + + $Age_Heaps{$ns} ||= Heap::Fibonacci->new(); + $Use_Heaps{$ns} ||= Heap::Fibonacci->new(); + + return; +} + sub new { my Cache::Memory $self = shift; my $args = $#_? { @_ } : shift; @@ -89,10 +98,8 @@ sub new { my $ns = $args->{namespace} || $DEFAULT_NAMESPACE; $self->{namespace} = $ns; - # init heaps - $Age_Heaps{$ns} ||= Heap::Fibonacci->new(); - $Use_Heaps{$ns} ||= Heap::Fibonacci->new(); - + $self->_init_ns_heaps($ns); + return $self; } @@ -169,8 +176,9 @@ sub clear { $Store_Sizes{$ns} = 0; # recreate age and used heaps (thus emptying them) - $Age_Heaps{$ns} = Heap::Fibonacci->new(); - $Use_Heaps{$ns} = Heap::Fibonacci->new(); + $self->_init_ns_heaps($ns); + + return; } sub count { @@ -210,6 +218,9 @@ sub namespace { sub set_namespace { my Cache::Memory $self = shift; my ($namespace) = @_; + + $self->_init_ns_heaps($namespace); + $self->{namespace} = $namespace; } diff --git a/lib/Cache/Memory/Entry.pm b/lib/Cache/Memory/Entry.pm index 7e0f5e7..62d36fa 100644 --- a/lib/Cache/Memory/Entry.pm +++ b/lib/Cache/Memory/Entry.pm @@ -25,7 +25,7 @@ use Carp; use base qw(Cache::Entry); use fields qw(store_entry); -our $VERSION = '2.04'; +our $VERSION = '2.08'; sub new { @@ -45,7 +45,7 @@ sub new { sub DESTROY { my Cache::Memory::Entry $self = shift; - + # drop the reference count and signal the cache if required unless (--$self->{store_entry}->{rc}) { $self->{cache}->entry_dropped_final_rc($self->{key}); diff --git a/lib/Cache/Null.pm b/lib/Cache/Null.pm index d55426b..4641655 100644 --- a/lib/Cache/Null.pm +++ b/lib/Cache/Null.pm @@ -28,7 +28,7 @@ use Cache::Null::Entry; use base qw(Cache); use fields qw(cache_root); -our $VERSION = '2.04'; +our $VERSION = '2.08'; =head1 CONSTRUCTOR diff --git a/lib/Cache/Null/Entry.pm b/lib/Cache/Null/Entry.pm index b2c982b..73a29ee 100644 --- a/lib/Cache/Null/Entry.pm +++ b/lib/Cache/Null/Entry.pm @@ -23,7 +23,7 @@ use Cache::IOString; use base qw(Cache::Entry); use fields qw(); -our $VERSION = '2.04'; +our $VERSION = '2.08'; sub new { diff --git a/lib/Cache/RemovalStrategy.pm b/lib/Cache/RemovalStrategy.pm index 229ab28..80daf88 100644 --- a/lib/Cache/RemovalStrategy.pm +++ b/lib/Cache/RemovalStrategy.pm @@ -16,7 +16,7 @@ use strict; use warnings; use Carp; -our $VERSION = '2.04'; +our $VERSION = '2.08'; sub new { @@ -40,6 +40,8 @@ sub remove_size; 1; __END__ +=back + =head1 SEE ALSO Cache diff --git a/lib/Cache/Tester.pm b/lib/Cache/Tester.pm index 4b19473..066d86f 100644 --- a/lib/Cache/Tester.pm +++ b/lib/Cache/Tester.pm @@ -32,7 +32,7 @@ use vars qw(@ISA @EXPORT $VERSION $CACHE_TESTS); use Carp; @ISA = qw(Exporter Test::More); -$VERSION = "2.04"; +$VERSION = '2.08'; @EXPORT = (qw(run_cache_tests $CACHE_TESTS), @Test::More::EXPORT); $CACHE_TESTS = 79; @@ -172,7 +172,7 @@ sub test_cache_count { $cache->set("key$_", "test"); } _is($cache->count(), 100, 'cache count correct after multiple sets'); - + shuffle(\@keys); foreach(@keys) { $cache->remove("key$_"); @@ -198,9 +198,12 @@ sub test_expiry { _ok(!$entry->exists(), 'entry set with instant expiry not added'); _is($cache->size(), $size, 'size is unchanged'); - $entry->set('test data', '1 sec'); - _ok($entry->exists(), 'entry with 1 sec timeout added'); - sleep(2); + # This is to fix/workaround the test failures by high load. See: + # https://rt.cpan.org/Public/Bug/Display.html?id=27280 + my $delay = $ENV{PERL_CACHE_PM_TESTING} ? 1 : 3; + $entry->set('test data', "$delay sec"); + _ok($entry->exists(), "entry with $delay sec timeout added"); + sleep($delay+1); _ok(!$entry->exists(), 'entry expired'); _is($cache->size(), $size, 'size is unchanged'); diff --git a/scripts/bump-version-number.pl b/scripts/bump-version-number.pl new file mode 100644 index 0000000..027153d --- /dev/null +++ b/scripts/bump-version-number.pl @@ -0,0 +1,35 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use File::Find::Object; +use IO::All; + +my $tree = File::Find::Object->new({}, 'lib/'); + +my $version_n = shift(@ARGV); + +if (!defined($version_n)) +{ + die "Specify version number as an argument! bump-version-number.pl '0.0.1'"; +} + +while (my $r = $tree->next()) { + if ($r =~ m{/\.svn\z}) + { + $tree->prune(); + } + elsif ($r =~ m{\.pm\z}) + { + my @lines = io->file($r)->getlines(); + foreach (@lines) + { + s#(\$VERSION = '|^Version )\d+\.\d+(?:\.\d+)?('|)#$1 . $version_n . $2#e; + } + io->file($r)->print( + @lines + ); + } +} + diff --git a/t/memory_set_namespace_rt32339.t b/t/memory_set_namespace_rt32339.t new file mode 100644 index 0000000..915bb71 --- /dev/null +++ b/t/memory_set_namespace_rt32339.t @@ -0,0 +1,21 @@ +#!/usr/bin/perl + +# Regression test for: +# https://rt.cpan.org/Ticket/Display.html?id=32339 + +use strict; +use warnings; + +use Cache::Memory; +use Test::More tests => 1; + +{ + my $cache = Cache::Memory->new(); + $cache->set('foo','bar'); + $cache->set_namespace("OtherNameSpace"); + # This used to die: + $cache->set('foo','bar2'); + # TEST + ok (1, "Program finished successfully."); +} + diff --git a/t/pod.t b/t/pod.t new file mode 100644 index 0000000..976d7cd --- /dev/null +++ b/t/pod.t @@ -0,0 +1,6 @@ +#!perl -T + +use Test::More; +eval "use Test::Pod 1.14"; +plan skip_all => "Test::Pod 1.14 required for testing POD" if $@; +all_pod_files_ok(); diff --git a/t/style-trailing-space.t b/t/style-trailing-space.t new file mode 100644 index 0000000..7b8ece4 --- /dev/null +++ b/t/style-trailing-space.t @@ -0,0 +1,29 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use Test::More; + +eval "use Test::TrailingSpace"; +if ($@) +{ + plan skip_all => "Test::TrailingSpace required for trailing space test."; +} +else +{ + plan tests => 1; +} + +my $finder = Test::TrailingSpace->new( + { + root => '.', + filename_regex => qr/(?:(?:\.(?:t|pm|pl|PL|yml|json|arc|vim))|README|Changes|LICENSE|MANIFEST)\z/, + }, +); + +# TEST +$finder->no_trailing_space( + "No trailing space was found." +); + -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcache-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list Pkg-perl-cvs-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits