- or download this
package Service;
use warnings;
...
}
1;
- or download this
package Service::JSON;
use warnings;
...
}
1;
- or download this
package Service::XML;
use warnings;
...
}
1;
- or download this
use warnings;
use strict;
...
my $json = Service->create('json', 'jsondata');
$json->populate;
is $json->{template}, '{"data": jsondata}', 'JSON';