Skip to content

Instantly share code, notes, and snippets.

@cfedde
Created April 18, 2014 22:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cfedde/11067138 to your computer and use it in GitHub Desktop.
Save cfedde/11067138 to your computer and use it in GitHub Desktop.
Synopsis broken?
#!perl
use Modern::Perl;
use Mojo::JSON::Pointer;
my $pointer = Mojo::JSON::Pointer->new({foo => [23, 'bar']});
say $pointer->get('/foo/1');
say 'Contains "/foo".' if $pointer->contains('/foo');
__END__
Use of uninitialized value $pointer in substitution (s///) at /opt/bcv/lib/perl5/site_perl/5.16.1/Mojo/JSON/Pointer.pm line 12.
/foo/1
Use of uninitialized value $pointer in substitution (s///) at /opt/bcv/lib/perl5/site_perl/5.16.1/Mojo/JSON/Pointer.pm line 12.
Contains "/foo".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment