[libclass-tiny-perl] 05/22: tidy
gregor herrmann
gregoa at debian.org
Sun May 31 14:03:04 UTC 2015
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to annotated tag release-0.001
in repository libclass-tiny-perl.
commit a013b489c166a7057d19c673e64c49dddba92b5f
Author: David Golden <dagolden at cpan.org>
Date: Thu Aug 15 22:11:13 2013 -0400
tidy
---
lib/Class/Tiny.pm | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/lib/Class/Tiny.pm b/lib/Class/Tiny.pm
index dbe8ab2..8e9b32b 100644
--- a/lib/Class/Tiny.pm
+++ b/lib/Class/Tiny.pm
@@ -7,10 +7,12 @@ package Class::Tiny;
# VERSION
use Carp ();
-if ($] >= 5.010) {
- require "mro.pm"; # hack to hide from perl minimum version & prereq scanners
-} else {
- require MRO::Compat;
+
+if ( $] >= 5.010 ) {
+ require "mro.pm"; # hack to hide from perl minimum version & prereq scanners
+}
+else {
+ require MRO::Compat;
}
my %CLASS_ATTRIBUTES;
@@ -36,8 +38,8 @@ sub new {
my $class = shift;
my $args;
if ( @_ == 1 && ref $_[0] ) { # hope it's a hash or hash object
- my %copy = eval { %{ $_[0] } }; # shallow copy
- if ( $@ ) {
+ my %copy = eval { %{ $_[0] } }; # shallow copy
+ if ($@) {
Carp::croak("Argument to $class->new() could not be dereferenced as a hash");
}
$args = \%copy;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libclass-tiny-perl.git
More information about the Pkg-perl-cvs-commits
mailing list