From 286a853af62407b85aa7d2d86bbe8753fcb1fd5d Mon Sep 17 00:00:00 2001 From: Lars Dieckow Date: Tue, 28 May 2013 14:29:11 +0200 Subject: [PATCH] depend on perl 5.014 --- Build.PL | 1 + Changes | 8 +++++++- lib/Sipwise/Base.pm | 1 + lib/Sipwise/Boilerplate.pm | 4 +--- lib/Sipwise/CodingStandards.pm | 12 +++++++++++- t/exports.t | 2 ++ 6 files changed, 23 insertions(+), 5 deletions(-) diff --git a/Build.PL b/Build.PL index 05f32a3..c1631bf 100644 --- a/Build.PL +++ b/Build.PL @@ -18,6 +18,7 @@ my $builder = Module::Build->new( 'Moose' => 2, 'MooseX::Method::Signatures' => 0, 'parent' => 0, + 'perl' => '5.014', 'perl5i::2' => 0, 'strictures' => 1, 'TryCatch' => 0, diff --git a/Changes b/Changes index 3ba3d1d..cf18bc9 100644 --- a/Changes +++ b/Changes @@ -6,7 +6,13 @@ Changes - Revision history for Sipwise-Base =head2 1.004 2013-07-04 -declare L dependencies, only used for developers +=over + +=item declare L dependencies, only used for developers + +=item Perl minimum version 5.14, brings changes to versioning and a Unicode handling aspect + +=back =head2 1.003 2013-06-17 diff --git a/lib/Sipwise/Base.pm b/lib/Sipwise/Base.pm index 95bba50..6436f09 100644 --- a/lib/Sipwise/Base.pm +++ b/lib/Sipwise/Base.pm @@ -1,4 +1,5 @@ package Sipwise::Base; +use 5.014; use utf8; use Module::Runtime qw(use_module); use parent 'autodie'; diff --git a/lib/Sipwise/Boilerplate.pm b/lib/Sipwise/Boilerplate.pm index a8e408d..9e2aaf9 100644 --- a/lib/Sipwise/Boilerplate.pm +++ b/lib/Sipwise/Boilerplate.pm @@ -15,12 +15,10 @@ Sipwise::Boilerplate - a template for new code Copy the following text, outdent it, save to a new file, then fill it in. Delete the C<=for author> POD sections after you are done with them. - package Something::Or::Other; + package Something::Or::Other 1.000; use Sipwise::Base; use namespace::sweep; - our $VERSION = '1.000'; - … # attributes, methods, package-level code go here $CLASS->meta->make_immutable; diff --git a/lib/Sipwise/CodingStandards.pm b/lib/Sipwise/CodingStandards.pm index 5bb1169..afeeb87 100644 --- a/lib/Sipwise/CodingStandards.pm +++ b/lib/Sipwise/CodingStandards.pm @@ -34,6 +34,13 @@ features of the language that should not be used anymore in new code. =head3 examples +For modules: + + package Foo::Bar 2.001; # 2nd version of revision 2 + package Fnord 2.420; # 421st version of revision 2 + +Otherwise: + our $VERSION = '2.001'; # 2nd version of revision 2 our $VERSION = '2.420'; # 421st version of revision 2 @@ -45,7 +52,10 @@ to make this easy, use C, which is part of L. Inc to depend on a new features or a changed API from code external to the distribution, it should be followed by a release of the distribution. -A version is a string consisting of a revision number, a literal dot as separator and a version number, altogether in +When using the L declaration, a version is a rational number. If a C declaration is not +suitable, declare the magic C<$VERSION> variable (see L) and then a version is a string. + +In any case, the version consists of a revision number, a literal dot as separator and a version number, altogether in the form C. C is a natural number, C are exactly three zero-padded digits. String quoting prevents trailing zeroes from disappearing. Padding to the same amount of digits prevents confusion about C<< 1.10 < 1.9 >>. Having exactly one separator prevents confusion about C<5.10.1 == 5.010001>. diff --git a/t/exports.t b/t/exports.t index f62701a..de3dc81 100644 --- a/t/exports.t +++ b/t/exports.t @@ -48,4 +48,6 @@ try { ok $e->isa('Foobar'), 'TryCatch works'; } +ok uc("\xe4") eq "\xc4", 'unicode_strings in effect'; + done_testing;