tobyink / p5-json-schema

1 stars 4 forks source link

Small error in POD #13

Open tobyink opened 3 years ago

tobyink commented 3 years ago

Migrated from rt.cpan.org #104485 (status was 'new')

Requestors:

From bessarabv@cpan.org (@bessarabov) on 2015-05-17 13:23:19 :

In JSON-Schema-0.016 POD there is an example:

my $validator = JSON::Schema->new({
  properties => { 
    'time' => { type => ['DateTime','string'] },
  },
});
my $object = {
  'time' => DateTime->now;
};
my $result = $schema->validate($object);

But this example is incorrect. The last line in the example should be changed to:

my $result = $validator->validate($object);