NAME

WWW::SchneierFacts::Fact - A fact about Bruce Schneier

SYNOPSIS

use WWW::SchneierFacts::Fact;

my $fact = WWW::SchneierFacts::Fact->new(
	id => 42,
);

$fact->fact; # the text

$ stringifies
warn "THIS IS A FACT: $fact";

if ( $fact->has_author ) {
	warn $fact->author; # not set if anonymous
}

DESCRIPTION

This is the class for a single Bruce Schneier fact.

ATTRIBUTES

Generally the attributes are fetched lazily.

WWW::SchneierFacts does the hard work.

fact

The fact text.

id

One of these is required. This is either the numeric ID or the link to the fact.

To get a random fact, use WWW::SchneierFacts::Fact.

author

The author of the fact.

db

The fact DB where this fact was obtained.

Used for scraping. Generally set by the DB itself.

TODO

WWW::SchneierFacts::Fact->new( fact => "foo", author => "me!" )->submit;