Group
Extension

Matches 2

DiaColloDB-WWW ( M/MO/MOOCOW/DiaColloDB-WWW-0.02.005.tar.gz, MOOCOW, 2020; MetaCPAN )
DiaColloDB-WWW/lib/DiaColloDB/WWW/CGI.pod ( view source; MetaCPAN )
   = $dbcgi->mtime($filename);
 $str      = $dbcgi->timestamp();
 $json_str = PACKAGE->to_json($data);
 $json_str = PACKAGE->from_json($data);
 \@daytime = PACKAGE->gettimeofday();
 $secs     = PACKAG
)

=over 4

=item load_config

 $dbcgi = $dbcgi->load_config($filename);

loads %$dbcgi keys from JSON filename, clobbering any existing values.

=back

=cut

##---------------------------------------
to_json

 $json_str = PACKAGE->to_json($data);
 $json_str = PACKAGE::to_json($data);
 $json_str = PACKAGE->to_json($data,\%opts);
 $json_str = PACKAGE::to_json($data,\%opts);

Wraps L<JSON::to_json()|
DiaColloDB-WWW ( M/MO/MOOCOW/DiaColloDB-WWW-0.02.005.tar.gz, MOOCOW, 2020; MetaCPAN )
DiaColloDB-WWW/lib/DiaColloDB/WWW/CGI.pm ( view source; MetaCPAN )
##-- for shared template data
use Cwd qw(getcwd abs_path);
#use LWP::UserAgent;
use Template;
use JSON qw();
use Time::HiRes qw();
use utf8;
use Carp;
use strict;

BEGIN {
  #binmode(STDIN, ':utf8');
ig loading (optional)

## $dbcgi = $dbcgi->load_config($filename)
##  + clobers %$dbcgi keys from JSON filename
sub load_config {
  my ($dbcgi,$file) = @_;
  open(RC,"<:raw",$file)
    or $dbcgi->logc
nfig(): close failed for '$file': $!");
  my $data = JSON::from_json($buf,{utf8=>1,relaxed=>1})
    or $dbcgi->logconfess("load_config(): from_json() failed for config data from '$file': $!");
  @$dbc

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