blib/lib/Keystone/Resolver/plugins/Citation/author.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 7 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 33 CC 2 SCAR 13.9
CC
2
Cov
0%
citation
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 4.0
1 # $Id: author.pm,v 1.2 2007-01-26 13:53:47 mike Exp $
2  
3 package Keystone::Resolver::plugins::Citation::author;
4  
5 use strict;
6 use warnings;
7  
8  
9 sub citation {
10 my $class = shift();
11 my($openurl) = @_;
12  
13 my($aulast, $aufirst, $date)
14 = map { $openurl->rft($_) } qw(aulast aufirst date);
15  
16 $aulast ||= "[Unspecified author]";
17 $aufirst ||= $openurl->rft("auinit");
18 $date ||= "[unspecified date]";
19  
20 $aulast .= ", $aufirst" if defined $aufirst;
21 $aulast =~ s/\.$//;
22  
23 return ("$aulast. $date.", "text/html");
24 }
25  
26  
27 1;