File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -154,10 +154,10 @@ sub add_schema {
154
154
croak ' cannot add a schema with a uri with a fragment' if defined $uri -> fragment;
155
155
croak ' insufficient arguments' if not @_ ;
156
156
157
- Carp::carp( ' use of deprecated form of add_schema with document ' )
158
- if $_ [0] -> $_isa( ' JSON::Schema::Modern::Document ' );
159
-
160
- return $self -> add_document( $uri , $_ [0]) if $_ [0] -> $_isa( ' JSON::Schema::Modern::Document ' );
157
+ if ( $_ [0] -> $_isa( ' JSON::Schema::Modern::Document ' )) {
158
+ Carp::carp( ' use of deprecated form of add_schema with document ' );
159
+ return $self -> add_document( $uri , $_ [0]);
160
+ }
161
161
162
162
# document BUILD will trigger $self->traverse($schema)
163
163
# Note we do not pass the uri to the document constructor, so resources in that document may still
You can’t perform that action at this time.
0 commit comments