Hi guys
I've been reading over many past threads on similar subjects but am still falling down at passing the DCR to my Perl module and reading values from it. My .tpl contains the following:
$dcr = iwpt_dcr_list('dcr');
print(TPL_functions::handleCustomMetadata($dcr));
At the moment I'm just trying to get the reading part sorted out so my Perl module is quite bare:
sub handleCustomMetadata {
my $dcr = $_;
my $metadata = $dcr->value('dcr.Metadata');
my
@customMetadata = $metadata->get_node_list('Custom Metadata');
my $counter=0;
foreach my $cm (
@customMetadata) {
$counter++;
}
return $counter;
}
But this doesn't work - using iwpt_compile on the TPL gives the following error, which implies that the DCR pass isn't successful, or I'm not trying to use the object in the right way:
Can't locate object method "value" via package "server_locale=English_UnitedStates.US-ASCII@Binary;"
Any ideas would be greatly appreciated!
Thanks
Gemma