File Coverage

blib/lib/Geography/Country/FIPS/Capitals.pm
Criterion Covered Total %
statement 1 1 100.0
branch 1 2 50.0
condition n/a
subroutine 1 1 100.0
pod 0 1 0.0
total 3 5 60.0


line stmt bran cond sub pod time code
1             # -*- Mode: Perl -*-
2             ################### Original code was by
3             # ITIID : $ITI$ $Header $__Header$
4             # Author : Ulrich Pfeifer
5             # Created On : Mon Aug 28 16:37:39 1995
6             # Last Modified By: Ulrich Pfeifer
7             # Last Modified On: Sun Mar 24 14:21:39 1996
8             # Language : Perl
9             # Update Count : 5
10             # Status : Unknown, Use with caution!
11             #
12             # (C) Copyright 1995, Universität Dortmund, all rights reserved.
13             #
14             # HISTORY
15             #
16             # $Locker: pfeifer $
17             # $Log: Country.pm,v $
18             # Revision 0.1.1.1 1996/03/25 11:19:18 pfeifer
19             # patch1:
20             #
21             # Revision 1.1 1996/03/24 13:33:52 pfeifer
22             # Initial revision
23             #
24             #
25             ######### Changed database to FIPS, renamed to a new module
26             # BUG: iso2fips will yield wrong answers with Yemen, Virgin Islands
27             # or simillar countries with doubles
28              
29             package Geography::Country::FIPS::Capitals;
30             require Exporter;
31             @EXPORT_OK = qw(Capital);
32             @ISA = qw(Exporter);
33              
34             while () {
35             chop;
36             ($cc, $rest) = split ' ', $_, 2;
37             next unless $cc;
38             $capital{$cc} = $rest;
39             }
40             close (DATA);
41              
42 1 50   1 0 98 sub Capital { $capital{uc($_[0])} || $_[0] };
43              
44              
45             1;
46              
47             __DATA__