NAME
Twitter::Daily::Blog::Base - Interface to be used for publishing an entry on any blog
SYNOPSIS
use Error (:try);
## The next module implements the subs descibed at Twitter::Daily::Blog::Base
use My::Blog::Publisher;
try {
my $blog = My::Blog::Publisher->new( param1 => 'firstParaneterContent', ... );
$blog->login();
## $filename contains the file path to the story to be published
$blog->publish( $filename );
$blog->quit;
}
catch Twitter::Daily::Blog::NoConstructorError with {
my $E = shift;
print STDERR "Error in constructor : ", $E->{'\-text'}, "\n";
}
catch Twitter::Daily::Blog::NoLoginError with {
my $E = shift;
print STDERR "Error in login : ", $E->{'\-text'}, "\n";
}
catch Twitter::Daily::Blog::NoPublishError with {
my $E = shift;
print STDERR "Error in publishing : ", $E->{'\-text'}, "\n";
}
catch Twitter::Daily::Blog::NoQuitError with {
my $E = shift;
print STDERR "Error in quitting : ", $E->{'\-text'}, "\n";
}
DESCRIPTION
Interface to be used for publishing an entry on any blog
INTERFACE
All methods throw an error on failure, and in such case the error thrown will be contained as text in -text and a unique numeric value in -value.
The arguments to be used for each method implementation are up to each implementation, meaning that unless otherwise is explicited the method will accept all sort of arguments.
new
Creates a new object.
login
Logins to the server. No arguments are accepted.
publish
Publishes the given story
options
filename
mandatory option that specifies the local filename to be published in the blog.
quit
Ends the publishing process. The method accepts no parameters.