File: from_dbm.pl

package info (click to toggle)
libwebservice-cia-perl 1.4-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 680 kB
  • ctags: 46
  • sloc: perl: 3,707; makefile: 5
file content (24 lines) | stat: -rw-r--r-- 474 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use strict;
use warnings;

use WebService::CIA;
use WebService::CIA::Source::DBM;

# Get data from a pre-compiled DBM file
# The webservice-cia-makedbm.pl script can make such a DBM
# for you

my $source = WebService::CIA::Source::DBM->new({ DBM => "factbook.dbm" });


# Create the WebService::CIA object, and tell it to use the
# DBM source

my $cia = WebService::CIA->new({ Source => $source });


# Get your data

my $fact = $cia->get("uk", "Population");
print $fact;