The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

ShipIt::Step::Twitter - ShipIt step to announce the upload on Twitter

SYNOPSIS

None.

DESCRIPTION

This ShipIt step announces the upload to Twitter.

To use it, just list it in your .shipit file. You might want to use it after the UploadCPAN step, as it is not a good idea to announce the upload before it has gone through - something might go wrong with the upload.

If this step fails - maybe Twitter is down - a warning is issued, but the shipit process doesn't die. This is because you might have uploaded the distribution to CPAN already, and it would be a shame for the whole process to die just because you're not able to twitter.

CONFIGURATION

In the .shipit file:

    twitter.config = /path/to/config/file
    twitter.distname = Foo-Bar
    twitter.message = shipped %d %v - soon at %u

You can define three configuration values for this step:

twitter.config

This is the location of the file that contains the Twitter username and password in YAML style. I keep mine in ~/.twitterrc. The first tilde is expanded to the user's home directory. An example file could look like this:

    username: foobar
    password: flurble

The reason not to keep the username and password in the .shipit file directly has to with security. The .shipit file will generally be in the distribution's base directory, so it is easy to make a mistake and to include it in the MANIFEST. This would lead to the password being published on CPAN.

This variable is mandatory.

twitter.distname

This variable is optional; it is the distribution's name. If the variable is not defined, the step will try to read the distribution name from the META.yml file.

twitter.message

This variable is optional; it is the message to send to Twitter. You can use placeholders, which will be expanded. If the variable is not defined, this default message will be used:

    shipped %d %v - soon at %u

The following placeholders are recognized:

%d

Will be expanded to the distribution name that you defined in twitter.distname.

%u

Will be expanded to the distribution's CPAN URL - if the distribution name is Foo-Bar, for example, the URL will be http://search.cpan.org/dist/Foo-Bar.

%v

Will be expanded to the version of the distribution you're shipping.

%%

Will result in a percent sign.

FUNCTIONS

init

Initializes the ShipIt step object from the shipit configuration file and then the twitter configuration file.

run

Does the actual twittering.

BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests through the web interface at http://rt.cpan.org.

INSTALLATION

See perlmodinstall for information and options on installing Perl modules.

AVAILABILITY

The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit <http://www.perl.com/CPAN/> to find a CPAN site near you. Or see <http://www.perl.com/CPAN/authors/id/M/MA/MARCEL/>.

AUTHORS

Marcel Grünauer, <marcel@cpan.org>

COPYRIGHT AND LICENSE

Copyright 2007-2008 by the authors.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.