Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Perl::Critic suggestions

  • Loading branch information...
commit 221e8866855356305add2ad934c119c324e8dd60 1 parent 382dd29
@barbie authored
View
4 Changes
@@ -1,5 +1,9 @@
# Changes log for Data::Phrasebook::Loader::Ini
+0.12 29/07/2012
+ - added Carp as a prerequisite.
+ - implemented Perl::Critic suggestions.
+
0.11 28/07/2012
- spelling fix. (thanks to Nicholas Bamber, Florian Schlichting &
Gregor Herrmann).
View
2  INSTALL
@@ -111,6 +111,6 @@ built correctly on your machine.
cheers,
Barbie.
-http://birmingham.pm.org/
+http://barbie.missbarbell.co.uk/
with much appreciation to Iain (aka Spoon).
View
9 META.json
@@ -1,6 +1,6 @@
{
"name": "Data-Phrasebook-Loader-Ini",
- "version": "0.11",
+ "version": "0.12",
"abstract": "Loader class for phrasebook implementations using INI files",
"author": [
"Barbie (BARBIE) <barbie@cpan.org>"
@@ -22,8 +22,9 @@
"runtime" : {
"requires" : {
"perl": "5.006",
- "Data::Phrasebook": "0.24",
- "Config::IniFiles": "0"
+ "Carp": "0",
+ "Config::IniFiles": "0",
+ "Data::Phrasebook": "0.24"
}
},
"test" : {
@@ -43,7 +44,7 @@
"provides": {
"Data::Phrasebook::Loader::Ini": {
"file": "lib/Data/Phrasebook/Loader/Ini.pm",
- "version": "0.11"
+ "version": "0.12"
}
},
"no_index": {
View
8 META.yml
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Data-Phrasebook-Loader-Ini
-version: 0.11
+version: 0.12
abstract: Loader class for phrasebook implementations using INI files
author:
- Barbie <barbie@cpan.org>
@@ -10,8 +10,10 @@ distribution_type: module
installdirs: site
requires:
- Data::Phrasebook: 0.24
+ perl: 5.006
+ Carp: 0
Config::IniFiles: 0
+ Data::Phrasebook: 0.24
recommends:
Test::CPAN::Meta: 0
Test::CPAN::Meta::JSON: 0
@@ -24,7 +26,7 @@ build_requires:
provides:
Data::Phrasebook::Loader::Ini:
file: lib/Data/Phrasebook/Loader/Ini.pm
- version: 0.11
+ version: 0.12
no_index:
directory:
- t
View
1  Makefile.PL
@@ -15,6 +15,7 @@ WriteMakefile(
PREREQ_PM => {
# runtime prereqs
+ 'Carp' => '0',
'Data::Phrasebook' => '0.24',
'Config::IniFiles' => '0',
View
10 lib/Data/Phrasebook/Loader/Ini.pm
@@ -5,7 +5,7 @@ use Carp qw( croak );
use base qw( Data::Phrasebook::Loader::Base Data::Phrasebook::Debug );
use Config::IniFiles;
-our $VERSION = '0.11';
+our $VERSION = '0.12';
=head1 NAME
@@ -145,14 +145,18 @@ sub keywords {
my $class = shift;
my $dict = shift;
- return sort $class->{cfg}->Parameters($dict) if($dict);
+ if($dict) {
+ my @dicts = sort $class->{cfg}->Parameters($dict);
+ return @dicts;
+ }
my @keywords = $class->{cfg}->Parameters($class->{dict});
push @keywords, $class->{cfg}->Parameters($class->{default})
unless($class->{dict} eq $class->{default});
my %keywords = map {$_=>1} @keywords;
- return sort keys %keywords;
+ @keywords = sort keys %keywords;
+ return @keywords;
}
1;
View
3  t/90podtest.t
@@ -1,3 +1,6 @@
+#!/usr/bin/perl -w
+use strict;
+
use Test::More;
eval "use Test::Pod 1.00";
plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
View
3  t/91podcover.t
@@ -1,3 +1,6 @@
+#!/usr/bin/perl -w
+use strict;
+
use Test::More;
eval "use Test::Pod::Coverage 0.08";
plan skip_all => "Test::Pod::Coverage 0.08 required for testing POD coverage" if $@;
View
5 t/94metatest.t
@@ -1,3 +1,6 @@
+#!/usr/bin/perl -w
+use strict;
+
use Test::More;
# Skip if doing a regular install
@@ -7,7 +10,7 @@ plan skip_all => "Author tests not required for installation"
eval "use Test::CPAN::Meta";
plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@;
-plan no_plan;
+plan 'no_plan';
my $meta = meta_spec_ok(undef,undef,@_);
View
5 t/95changedate.t
@@ -1,3 +1,6 @@
+#!/usr/bin/perl -w
+use strict;
+
use Test::More;
use IO::File;
use Data::Phrasebook::Loader::Ini;
@@ -8,7 +11,7 @@ plan skip_all => "Author tests not required for installation"
my $fh = IO::File->new('Changes','r') or plan skip_all => "Cannot open Changes file";
-plan no_plan;
+plan 'no_plan';
my $latest = 0;
while(<$fh>) {
View
5 t/96metatest.t
@@ -1,3 +1,6 @@
+#!/usr/bin/perl -w
+use strict;
+
use Test::More;
# Skip if doing a regular install
@@ -7,7 +10,7 @@ plan skip_all => "Author tests not required for installation"
eval "use Test::CPAN::Meta::JSON";
plan skip_all => "Test::CPAN::Meta::JSON required for testing META.json files" if $@;
-plan no_plan;
+plan 'no_plan';
my $meta = meta_spec_ok(undef,undef,@_);

0 comments on commit 221e886

Please sign in to comment.
Something went wrong with that request. Please try again.