On Thu, 14 Oct 2010, Sir Robert Burbridge wrote:
The check in line 30 checks if there was just one arg. Probably, it
should do something more like
--- Object.old.pm 2010-10-13 11:03:48.000000000 -0400
+++ Object.new.pm 2010-10-13 11:07:15.000000000 -0400
@@ -35,9 +35,11 @@
}
return { %{ $_[0] } };
}
- else {
- return {...@_};
+ elsif (scalar @_ % 2) {
+ warn "all args should be paired values (e.g. a=>1), not:
@_";
}
I think the warning needs to be clearer, and probably should be using
Carp. Also, sticking all of @_ in the error will probably make a mess.
-dave
/*============================================================
http://VegGuide.org http://blog.urth.org
Your guide to all that's veg House Absolute(ly Pointless)
============================================================*/