| 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 dial codes | 
| 26 |  |  |  |  |  |  |  | 
| 27 |  |  |  |  |  |  | package Geography::Country::Dial; | 
| 28 |  |  |  |  |  |  | BEGIN { | 
| 29 | 3 |  |  | 3 |  | 10 | eval { require Net::Country; }; | 
|  | 3 |  |  |  |  | 1882 |  | 
| 30 |  |  |  |  |  |  | } | 
| 31 |  |  |  |  |  |  |  | 
| 32 |  |  |  |  |  |  | require Exporter; | 
| 33 |  |  |  |  |  |  | @EXPORT_OK = qw(dialcode); | 
| 34 |  |  |  |  |  |  | @ISA = qw(Exporter); | 
| 35 |  |  |  |  |  |  |  | 
| 36 |  |  |  |  |  |  | $VERSION = 1.01; | 
| 37 |  |  |  |  |  |  |  | 
| 38 |  |  |  |  |  |  | while () { | 
| 39 |  |  |  |  |  |  | chop; | 
| 40 |  |  |  |  |  |  | ($cc, $rest) = split /\|/; | 
| 41 |  |  |  |  |  |  | next unless $cc; | 
| 42 |  |  |  |  |  |  | $country{lc($cc)} = $rest; | 
| 43 |  |  |  |  |  |  | } | 
| 44 |  |  |  |  |  |  | close (DATA); | 
| 45 |  |  |  |  |  |  |  | 
| 46 | 2 | 100 |  | 2 | 0 | 122 | sub dialcode { $country{lc($_[0])} || $country{lc(Net::Country::Name($_[0]))};} | 
| 47 |  |  |  |  |  |  |  | 
| 48 |  |  |  |  |  |  | 1; | 
| 49 |  |  |  |  |  |  |  | 
| 50 |  |  |  |  |  |  | __DATA__ |