App-Tweet
view release on metacpan or search on metacpan
=item --help
displays help page
=item --man
displays man page
=item --reconfigure
force new user and password to be prompted for
=item --username=s
username from the command line instead of a config file
=item --password=s
password from the command line instead of a config file
=back
lib/App/Tweet.pm view on Meta::CPAN
$config->{username} = $args->{username} if exists $args->{username};
$config->{password} = $cipher->encrypt( $args->{password} )
if exists $args->{password};
if ( not defined $config->{username} ) {
DEBUG "unable to find user name in configuration file";
die ERROR
"can't prompt for config file values in non-interactive environment"
unless is_interactive();
$config->{username} =
prompt( 'x', 'Username: ', 'from twitter.com', qw{} );
$config->write();
}
if ( not defined $config->{password} ) {
DEBUG "unable to find password in configuration file";
$config->{password} = $cipher->encrypt(
prompt( 'p', 'Password: ', 'from twitter.com', qw{} ) );
$config->write();
}
DEBUG "password [$config->{password}]";
$config->{password} = $cipher->decrypt( $config->{password} );
DEBUG "password [$config->{password}]";
lib/App/Tweet.pm view on Meta::CPAN
App::Tweet->run('tell this to twitter');
App::Tweet->reconfigure;
=head1 DESCRIPTION
C<App::Tweet> is a simple wrapper around L<Net::Twitter> that allows for you to easily send
messages (tweets) to twitter.com as a specific user. You should use the 'tweet' command to
interface with this module.
The first time you C<run> the application it will prompt you for a user name and password. This
information is stored in a configuration file in your system's application data store. The
password is stored in a somewhat encrypted state, but the cipher key for the encryption is
stored right beside the configuration file, so it's not super-security. The permissions on
the file are set to read/write only by the file owner, but that is only relevant on some systems.
If you ever need to reset or change the username or password perminantely, you can use the
C<reconfigure> method. If the change is just temporary, pass in the new username and password
when C<run>ning the application.
=head1 METHODS
=over 4
=item run( message => 'x', [ username => 'x', password => 'x' ] )
Runs the application and attempts to send a message to twitter using a configured username
and password or the one provided as an argument to this command.
=item reconfigure
Forces re-prompting for the stored username and password.
=back
=head1 AUTHOR
Josh McAdams, C<< <josh dot mcadams at gmail dot com> >>
=head1 BUGS
Please report any bugs or feature requests to
( run in 0.597 second using v1.01-cache-2.11-cpan-0b5f733616e )