File: from_web.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 (23 lines) | stat: -rw-r--r-- 433 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
use strict;
use warnings;

use WebService::CIA;
use WebService::CIA::Source::Web;

# Get data straight from the CIA Factbook web site
# Good for one-off fetches, testing, etc.

my $source = WebService::CIA::Source::Web->new();


# 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;