Net::Twitter::RandomUpdate - Make people think you're paying attention to Twitter


Net-Twitter-RandomUpdate documentation  | view source Contained in the Net-Twitter-RandomUpdate distribution.

Index


NAME

Top

Net::Twitter::RandomUpdate - Make people think you're paying attention to Twitter

DESCRIPTION

Top

Will submit a random tweet at generally random times with some canned quotes or quotes defined by the implementor.

METHODS

Top

new( [ optional_quotes ] );

Will return a new object. You can pass an OPTIONAL reference to an array with a list of tweets the module will choose from. If ignored, the following will be used:

    my $quotes = [
        'How to store your baby walker: First, remove baby.',
        'I get to go to lots of overseas places, like Canada.',
        'The team has come along slow but fast.',
        'Most cars on our roads have only one occupant, usually the driver.',
        'Football players win football games.',
        'Most lies about blondes are false.',
        'I love California, I practically grew up in Phoenix.',
        'Strangely, in slow motion replay, the ball seemed to hang in the air for even longer.',
        'We\'re just physically not physical enough.',
        'The world is more like it is now then it ever has before.',
        'I cannot tell you how grateful I am -- I am filled with humidity.',
        'I have a God-given talent. I got it from my dad.',
        'Traditionally, most of Australia\'s imports come from overseas.',
    ];

tweet

Will send a tweet to the specified account if it falls within the random regularity selection.

ATTRIBUTES

Top

regularity

Default: .05 (will only tweet 5% of the time)

An integer <= 1 and >= 0, indicating the percentage of times you want the module to tweet. Good for use in a crontab, for example.

username

The username of the account.

password

The password of the account.

EXAMPLES

Top

    use Net::Twitter::RandomUpdate;

    # Use the default tweet-set send a tweet 100% of the time
    my $rand = Net::Twitter::RandomUpdate->new();
    $rand->regularity(1);
    $rand->password('pass');
    $rand->username('user');
    $rand->tweet();

    # Use self-defined tweet-set, send a tweet 50% of the time 
    my $rand = Net::Twitter::RandomUpdate->new( [ qw( hi ) ] );
    $rand->regularity(.5);
    $rand->password('pass');
    $rand->username('user');
    $rand->tweet();

SEE ALSO

Top

Net::Twitter

AUTHOR

Top

Trevor Hall, <wazzuteke@cpan.org>

COPYRIGHT AND LICENSE

Top


Net-Twitter-RandomUpdate documentation  | view source Contained in the Net-Twitter-RandomUpdate distribution.