Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Twitter when you release with Dist::Zilla

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 corpus Add "=head1 NAME" so the pod will get munged during test November 27, 2013
Octocat-spinner-32 lib Use SSL to connect to Twitter January 16, 2014
Octocat-spinner-32 t Add @META{...} and META{...}[\d] interpolation for arrayrefs September 27, 2013
Octocat-spinner-32 .gitignore initial import of Dist-Zilla-Plugin-Twitter April 25, 2010
Octocat-spinner-32 Build.PL Released 0.025 January 16, 2014
Octocat-spinner-32 Changes Released 0.025 January 16, 2014
Octocat-spinner-32 MANIFEST.SKIP Use Twitter API v1.1 June 13, 2013
Octocat-spinner-32 Makefile.PL Released 0.025 January 16, 2014
Octocat-spinner-32 README Released 0.025 January 16, 2014
Octocat-spinner-32 README.PATCHING add README.PATCHING October 07, 2011
Octocat-spinner-32 README.mkdn Released 0.025 January 16, 2014
Octocat-spinner-32 Todo Todo: delay tweet until URL is live April 26, 2010
Octocat-spinner-32 dist.ini My repo is the authoritative fork now February 02, 2013


Dist::Zilla::Plugin::Twitter - Twitter when you release with Dist::Zilla


version 0.025


In your dist.ini:

hash_tags = #foo
url_shortener = TinyURL


This plugin will use Net::Twitter to send a release notice to Twitter. By default, it will include a link to release on

The default configuration is as follows:

tweet_url ={{$AUTHOR_UC}}/{{$DIST}}-{{$VERSION}}/
tweet = Released {{$DIST}}-{{$VERSION}}{{$TRIAL}} {{$URL}} !META{resources}{repository}{web}
url_shortener = TinyURL

The tweet_url is shortened with WWW::Shorten::TinyURL or whichever other service you choose (use 'none' to use the full URL, in which case Twitter will shorten it for you) and appended to the tweet message.


The following variables are available for substitution in the URL and message templates:

  DIST        # Foo-Bar
  MODULE      # Foo::Bar
  ABSTRACT    # Foo-Bar is a module that FooBars
  VERSION     # 1.23
  TRIAL       # -TRIAL if is_trial, empty string otherwise.
  TARBALL     # Foo-Bar-1.23.tar.gz
  AUTHOR_LC   # johndoe
  URL         #


Resources information available in the META.* files of the distribution can be accessed via <META{key}{subkey}[1]>. You may mix-and-match {...} to access hashref elements and [\d] to access arrayref elements. You're responsible for making sure you are accessing the right part of the META data structure, and treating it as the right type of data. See CPAN::Meta::Spec and the "$TYPE DATA" sections of CPAN::Meta in particular.

The META{...} replacement may also have one of two modifiers, which are prefixed directly before META:

  • ! - URL shortening

    Providing an exclamation point (!META{...}) will URL-shorten the value you extract from the distmeta data structure. This will have no effect unless the value is a URL to begin with.

  • @ - Arrayref stringification

    Providing an at-symbol (@META{...}) will include all the elements of the arrayref you specify by joining them with $". So, this is just like doing "@{ $your_array_ref }".

So, for example, to use the GitHub home of the project instead of its metacpan page, one can do:

tweet = Released {{$DIST}}-{{$VERSION}}{{$TRIAL}} !META{resource}{repository}{web}
url_shortener = TinyURL

Or, to include the authors in your tweet:

tweet = @META{author} released {{$MODULE}} {{$VERSION}}: {{$URL}}


You must be using the UploadToCPAN or FakeRelease plugin for this plugin to determine your PAUSEID.


You can use the hash_tags option to append hash tags (or anything, really) to the end of the message generated from tweet.

hash_tags = #perl #cpan #foo


The project homepage is

The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit to find a CPAN site near you, or see


The development version is on github at and may be cloned from git://


You can make new bug reports, and view existing ones, through the web interface at



This software is Copyright (c) 2014 by David Golden.

This is free software, licensed under:

The Apache License, Version 2.0, January 2004
Something went wrong with that request. Please try again.