use strict; use warnings; use lib '.'; use Test::More; use_ok 'Service', 'Service.pl loads'; my $xml = Service->new('xml', 'xmldata'); use Data::Dumper; print Dumper $xml; $xml->populate; is $xml->{template}, 'xmldata', 'XML OK'; my $json = Service->new('json', 'jsondata'); $json->populate; is $json->{template}, '{"data": jsondata}', 'JSON OK'; done_testing;