Sponsored Content
The Lounge What is on Your Mind? Mad World Remix of Moby Video (Are You Lost In The World Like Me) Post 303026046 by vbe on Monday 19th of November 2018 03:47:59 AM
Old 11-19-2018
Cool...
 

7 More Discussions You Might Find Interesting

1. Solaris

hello world

just wanted to give salutations to all in here. i hope to contribute as much as i take. happy "unix-ing" :b: (0 Replies)
Discussion started by: JeepResQ
0 Replies

2. What is on Your Mind?

What The World Needs Now...

What does the world need now.... ??? Feel free to suggest new items to the poll .... we might add them :) (25 Replies)
Discussion started by: Neo
25 Replies

3. UNIX for Dummies Questions & Answers

What in the world does $$ mean?

If I type "echo $$" in to the command line it outputs some random number but it outputs the same one every time. What is this? (7 Replies)
Discussion started by: weexpectedthis
7 Replies

4. Programming

Almost -> Hello World!

Hello! I know I must take the efforts of learning C..! I need to recompile a binary with the following at the beginning: test if a file exists, remove it and exit. All in "C". As simple as this in sh: file=/tmp/filename if ; then rm -f $file exit 0 fi Thanks! (8 Replies)
Discussion started by: teresaejunior
8 Replies

5. Programming

Exact meaning of the "world" in "hello world"

Hello! I have a question to native English-speaking people. In the popular program's "hello world" greeting, what meaning the "world" has: "all", "everybody", "people", "friends" or "whole world", "planet", "Earth", "Universe"? In other words, to whom this greeting is addressed: to the... (14 Replies)
Discussion started by: Eugene Muzychen
14 Replies

6. What is on Your Mind?

Hello World!

Just wanna say "Hello World!" :) (6 Replies)
Discussion started by: ment0smintz
6 Replies

7. What is on Your Mind?

UNIX.com Hello World HUD YT Video

UNIX.com Hello World HUD YT Video https://youtu.be/cs3dbPnzDV4 Check it out! Subscribe, Like, Share, Comment . Cyber Dystopia (Ep. 2) - The Myth of the Singularity Coming Soon! (3 Replies)
Discussion started by: Neo
3 Replies
WebService::CIA::Source::Web(3pm)			User Contributed Perl Documentation			 WebService::CIA::Source::Web(3pm)

NAME
WebService::CIA::Source::Web - An interface to the online CIA World Factbook SYNOPSIS
use WebService::CIA::Source::Web; my $source = WebService::CIA::Source::DBM->new(); DESCRIPTION
WebService::CIA::Source::Web is an interface to the live, online version of the CIA World Factbook. It's a very slow way of doing things, but requires no pre-compiled DBM. It's more likely to be useful for proving concepts or testing. METHODS
Apart from "new", these methods are normally accessed via a WebService::CIA object. "new( \%opts )" my $source = WebService::CIA::Source::Web->new(); $source = WebService::CIA::Source::Web->new( { user_agent => $ua } ); This method creates a new WebService::CIA::Source::Web object. It takes an optional hashref of arguments. "user_agent" A user agent object to use. This must implement the same user interface as "LWP::UserAgent" (or, at least, a "get()" method). "value($country_code, $field)" Retrieve a value from the web. $country_code should be the FIPS 10-4 country code as defined in <https://www.cia.gov/library/publications/the-world-factbook/appen- dix/appendix-d.html>. $field should be the name of the field whose value you want to retrieve, as defined in <https://www.cia.gov/library/publica- tions/the-world-factbook/docs/notesanddefs.html>. (WebService::CIA::Parser also creates four extra fields: "URL", "URL - Print", "URL - Flag", and "URL - Map" which are the URLs of the country's Factbook page, the printable version of that page, a GIF map of the coun- try, and a GIF flag of the country respectively.) "value" will return "undef" if the country or field cannot be found, or if there is an error GETing the page. This isn't ideal, but I can't think of the best way around it right now. "all($country_code)" Returns a hashref of field-value pairs for $country_code or an empty hashref if $country_code isn't available from the Factbook. "get($country_code)" Retrieve and cache the data for a country. Returns 1 if successful, 0 if not. "cached($country_code)" Get/set the country code whose data is cached. "cache($hashref)" Get/set a hashref of data for the current country. "parser()" Returns a reference to the WebService::CIA::Parser object being used. "ua( $userAgent )" Returns a reference to the user agent object being used. By default this is an "LWP::UserAgent" object, but you can pass a different object in if you wish. "last_response()" Returns the "HTTP::Response" object from the last request. CACHING
In order to make some small improvement in efficiency, WebService::CIA::Source::Web keeps a copy of the data for the last country down- loaded in memory. TO DO
File system based caching of pages. User-definable stack of cached countries, rather than just one. Caching of last-modified headers; conditional GET. AUTHOR
Ian Malpass (ian-cpan@indecorous.com) COPYRIGHT
Copyright 2003-2007, Ian Malpass This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The CIA World Factbook's copyright information page (<https://www.cia.gov/library/publications/the-world-factbook/docs/contributor_copy- right.html>) states: The Factbook is in the public domain. Accordingly, it may be copied freely without permission of the Central Intelligence Agency (CIA). SEE ALSO
WebService::CIA, WebService::CIA::Parser, WebService::CIA::Source::DBM perl v5.8.8 2008-02-04 WebService::CIA::Source::Web(3pm)
All times are GMT -4. The time now is 01:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy