Group
Extension

Matches 1

Data-Properties-JSON ( J/JO/JOHND/Data-Properties-JSON-0.004.tar.gz, JOHND, 2012; MetaCPAN )
Data-Properties-JSON/lib/Data/Properties/JSON.pm ( view source; MetaCPAN )

package Data::Properties::JSON;

use strict;
use warnings 'all';
use JSON::XS;
our $VERSION = '0.004';


sub new
{
  my ($class, %args) = @_;
  
  if( $args{properties_file} )
  {
    $args{__name} =
 reading: $!";
    local $/;
    $args{data} = decode_json(scalar(<$ifh>));
  }
  elsif( $args{json} )
  {
    $args{data} = decode_json($args{json});
    $args{__name} = 'root';
  }
  elsif( $args{da
ta} )
  {
    $args{__name} ||= 'root';
  }
  else
  {
    die "Neither properties_file nor json nor data were provided.";
  }# end if()
  
  my $s = bless \%args, $class;
  if( ref($s->{data}) eq 'HA

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