Commits

Toby Inkster  committed d073413

Minor bugfix release.

  • Participants
  • Parent commits 8905d06
  • Tags 0.501

Comments (0)

Files changed (9)

File lib/JSON/JOM.pm

 BEGIN
 {
 	$JSON::JOM::AUTHORITY = 'cpan:TOBYINK';
-	$JSON::JOM::VERSION   = '0.500';
+	$JSON::JOM::VERSION   = '0.501';
 
 	@EXPORT    = qw[];
 	@EXPORT_OK = qw[from_json to_json to_jom ref];

File lib/JSON/JOM/Array.pm

 BEGIN
 {
 	$JSON::JOM::Array::AUTHORITY = 'cpan:TOBYINK';
-	$JSON::JOM::Array::VERSION   = '0.500';
+	$JSON::JOM::Array::VERSION   = '0.501';
 }
 
 

File lib/JSON/JOM/Node.pm

 use UNIVERSAL::ref;
 
 use Carp qw[];
-use Module::Pluggable search_path => qw[JSON::JOM::Plugins], require => 1, sub_name => '_plugins', search_dirs => [qw[lib blib/lib]];
+use Module::Pluggable
+	search_path => qw[JSON::JOM::Plugins],
+	require     => 1,
+	sub_name    => '_plugins',
+	search_dirs => [qw[lib blib/lib]],
+	;
 use Scalar::Util qw[];
 
 our ($META, $AUTOLOAD, $EXTENSIONS, $TIEMAP);
 BEGIN
 {
 	$JSON::JOM::Node::AUTHORITY = 'cpan:TOBYINK';
-	$JSON::JOM::Node::VERSION   = '0.500';
+	$JSON::JOM::Node::VERSION   = '0.501';
 }
 
 sub import
 sub can
 {
 	my ($self, $method) = @_;
-	return 1
-		if UNIVERSAL::can($self, $method);
-	return 1
-		if defined $JSON::JOM::Node::EXTENSIONS->{ $self->typeof }->{ $method }
-		&& ref $JSON::JOM::Node::EXTENSIONS->{ $self->typeof }->{ $method } eq 'CODE';
-	return 1
-		if defined $JSON::JOM::Node::EXTENSIONS->{'NODE'}->{ $method }
-		&& ref $JSON::JOM::Node::EXTENSIONS->{'NODE'}->{ $method } eq 'CODE';
+
+	if (my $code = UNIVERSAL::can($self, $method))
+	{
+		return $code;
+	}
+	
+	if (defined $JSON::JOM::Node::EXTENSIONS->{ $self->typeof }->{ $method }
+	&&  ref $JSON::JOM::Node::EXTENSIONS->{ $self->typeof }->{ $method } eq 'CODE')
+	{
+		return $JSON::JOM::Node::EXTENSIONS->{ $self->typeof }->{ $method };
+	}
+	
+	if (defined $JSON::JOM::Node::EXTENSIONS->{'NODE'}->{ $method }
+	&&  ref $JSON::JOM::Node::EXTENSIONS->{'NODE'}->{ $method } eq 'CODE')
+	{
+		return $JSON::JOM::Node::EXTENSIONS->{'NODE'}->{ $method };
+	}
+	
 	return;
 }
 
 	return $self->meta->{$key};
 }
 
+sub typeof
+{
+	return;
+}
+
 sub new
 {
 	Carp::croak "JSON::JOM::Node is abstract - use a subclass.";
 }
 
-sub typeof
-{
-	Carp::croak "JSON::JOM::Node is abstract - use a subclass.";
-}
-*ref = \&typeof;
-
 sub TO_JSON
 {
 	Carp::croak "JSON::JOM::Node is abstract - use a subclass.";

File lib/JSON/JOM/Object.pm

 BEGIN
 {
 	$JSON::JOM::Object::AUTHORITY = 'cpan:TOBYINK';
-	$JSON::JOM::Object::VERSION   = '0.500';
+	$JSON::JOM::Object::VERSION   = '0.501';
 }
 
 sub new

File lib/JSON/JOM/Plugins/Dumper.pm

 BEGIN
 {
 	$JSON::JOM::Plugins::Dumper::AUTHORITY = 'cpan:TOBYINK';
-	$JSON::JOM::Plugins::Dumper::VERSION   = '0.500';
+	$JSON::JOM::Plugins::Dumper::VERSION   = '0.501';
 }
 
 sub extensions

File lib/JSON/JOM/Plugins/ListUtils.pm

 BEGIN
 {
 	$JSON::JOM::Plugins::ListUtils::AUTHORITY = 'cpan:TOBYINK';
-	$JSON::JOM::Plugins::ListUtils::VERSION   = '0.500';
+	$JSON::JOM::Plugins::ListUtils::VERSION   = '0.501';
 }
 
 sub extensions

File lib/JSON/JOM/Plugins/TreeUtils.pm

 BEGIN
 {
 	$JSON::JOM::Plugins::TreeUtils::AUTHORITY = 'cpan:TOBYINK';
-	$JSON::JOM::Plugins::TreeUtils::VERSION   = '0.500';
+	$JSON::JOM::Plugins::TreeUtils::VERSION   = '0.501';
 }
 
 sub extensions

File lib/JSON/JOM/Value.pm

 BEGIN
 {
 	$JSON::JOM::Value::AUTHORITY = 'cpan:TOBYINK';
-	$JSON::JOM::Value::VERSION   = '0.500';
+	$JSON::JOM::Value::VERSION   = '0.501';
 }
 
 sub new

File meta/changes.ttl

 		dcs:item   [ rdfs:label "Module::Package::RDF"@en ;  a dcs:Packaging ] 
 		] .
 
+my:project :release my:v_0-501 .
+my:v_0-501
+	a               :Version ;
+	dc:issued       "2012-01-17"^^xsd:date ;
+	:revision       "0.501"^^xsd:string ;
+	:file-release   <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/JSON-JOM-0.501.tar.gz> ;
+	dcs:changeset [
+		dcs:versus my:v_0-500 ;
+		dcs:item   [ rdfs:label "'can' method should return a coderef when object can do a method"@en ; a dcs:Bugfix ] ;
+		dcs:item   [ rdfs:label "JSON::JOM::Node abstract class, method 'typeof' returns undef instead of croaking"@en ] ;
+		dcs:item   [ rdfs:label "JSON::JOM::Node abstract class, method 'ref' no longer exists"@en ]
+		] .
+