Twitter::Daily::Blog::Base - Interface to be used for publishing an entry on any blog
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"; }
Interface to be used for publishing an entry on any blog
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.
Creates a new object.
Logins to the server. No arguments are accepted.
Publishes the given story
filename
mandatory option that specifies the local filename to be published in the blog.
Ends the publishing process. The method accepts no parameters.
To install Twitter::Daily, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Twitter::Daily
CPAN shell
perl -MCPAN -e shell install Twitter::Daily
For more information on module installation, please visit the detailed CPAN module installation guide.