Group
Extension

Matches 1

String-Flogger ( R/RJ/RJBS/String-Flogger-1.101246.tar.gz, RJBS, 2022; MetaCPAN )
String-Flogger/lib/String/Flogger.pm ( view source; MetaCPAN )

my $JSON;
sub _stringify_ref {
  my ($self, $ref) = @_;

  if (ref $ref eq 'SCALAR' or ref $ref eq 'REF') {
    my ($str) = $self->_encrefs([ $$ref ]);
    return "ref($str)";
  }

  require JSON::Ma
ybeXS;
  $JSON ||= JSON::MaybeXS->new
                         ->ascii(1)
                         ->canonical(1)
                         ->allow_nonref(1)
                         ->space_after(1)
 
 callback
  # passed to JSON: https://rt.cpan.org/Ticket/Display.html?id=54321
  # -- rjbs, 2013-01-31
  local *UNIVERSAL::TO_JSON = sub { "obj($_[0])" };

  return '{{' . $JSON->encode($ref) . '}}'
}

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.