blib/lib/Keystone/Resolver/plugins/ServiceType/citation.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 25 CC 2 SCAR 12.8
CC
2
Cov
0%
handle
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.6
1 # $Id: citation.pm,v 1.2 2007-01-26 13:53:49 mike Exp $
2  
3 package Keystone::Resolver::plugins::ServiceType::citation;
4  
5 use strict;
6 use warnings;
7  
8  
9 sub handle {
10 my $class = shift();
11 my($openURL, $service) = @_;
12  
13 my $style = $service->tag();
14 eval {
15 require "Keystone/Resolver/plugins/Citation/$style.pm";
16 }; if ($@) {
17 $openURL->warn("can't load citation-style plugin '$style': $@");
18 return (undef, "citation style '$style' not defined");
19 }
20  
21 my($citation, $mimeType) =
22 "Keystone::Resolver::plugins::Citation::$style"->citation($openURL);
23  
24 return ($citation, undef, undef, $mimeType);
25 }
26  
27  
28 1;