Skip Menu |

This queue is for tickets about the Params-Validate CPAN distribution.

Report information
The Basics
Id: 25229
Status: resolved
Priority: 0/
Queue: Params-Validate

People
Owner: Nobody in particular
Requestors: STEFFENW [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.86
Fixed in:
  • 0.88
  • 0.88



Subject: error in isa validation
use strict; use warnings; use CGI; my %hash; $object->set_foo(\%hash); # error: Can't call method "isa" on unblessed reference at ... # It looks like an Params::Validate internal error but the user used the false API. Otherside the user get an error like parameter #2 ... # Why isa validation don't check object before? Have I to write type => OBJECT and isa => CGI? $object->set_foo(CGI->new(), \%hash); # ok package Foo; sub new { return bless {}, shift; } sub set_foo { my ($self, $cgi_object, $hash) = validate_pos( @_, {type => OBJECT}, {isa => 'CGI'}, {type => HASHREF}, ); # and so on }