Closed nicolasfranck closed 7 years ago
Now the read method from Catmandu::Bagit only returns an object or undef
my $bagit = Catmandu::BagIt->read($path)
In array context it should also return the errors:
my($bagit,@errors) = Catmandu::BagIt->read($path)
Which can be done easily:
sub read { #.. if ( wantarray ) { #new code return $ok == 7 ? ($self) : (undef, $self->errors); } else { #old code return $ok == 7 ? $self : undef; } }
Now the read method from Catmandu::Bagit only returns an object or undef
In array context it should also return the errors:
Which can be done easily: