« blib/lib/Keystone/Resolver/plugins/Service/Infotrac.pm
↑ Summary
blib/lib/Keystone/Resolver/plugins/ID/info/doi.pm »
| 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; |