Text::Tweet - Optimize a tweet based on given keywords
version 0.004
use Text::Tweet; my $tweeter = new Text::Tweet({ maxlen => 140, marker => '#', hashtags_at_end => 0, keywords => [ 'Perl', 'Twitter', 'Facebook', 'Private' ], }); my $tweet = $tweeter->make( 'This is my Perl Twitter Facebook Tweet', \'http://some.url/' ); # This is my #Perl #Twitter #Facebook Tweet http://some.url/ #private my $next_tweet = $tweeter->make_without_keywords( 'This is my Perl Twitter Facebook Tweet', \'http://some.url/', [ 'Tweet' ] ); # This is my Perl Twitter Facebook #Tweet http://some.url/ my $other_tweeter = new Text::Tweet({ hashtags_at_end => 1, }); my $other_tweet = $other_tweeter->make( 'This is my Perl Twitter Facebook Tweet', \'http://some.url/', [ 'Perl', 'Twitter', 'Facebook' ] ); # This is my Perl Twitter Facebook Tweet http://some.url/ #perl #twitter #facebook
This package is nothing more than a little helper for making a more optimized tweet. It is supposed to be part of some bigger application, for example for automatic Tweet generation out of RSS, or integrated via Ajax on a webpage to offer more effective tweets for the user.
edenc - giving API design hints
Torsten Raudssus <torsten@raudssus.de> http://www.raudssus.de/
This software is copyright (c) 2011 by Raudssus Social Software.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Text::Tweet, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Tweet
CPAN shell
perl -MCPAN -e shell install Text::Tweet
For more information on module installation, please visit the detailed CPAN module installation guide.