The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


Net::TrackBack - A modularized implementation of core TrackBack 1x functionality.


        <!-- a sample receive ping -->
        use Net::TrackBack;
        use CGI qw( :cgi-lib :standard );

        my $q = new CGI;
        my $p = new Net::TrackBack;

        my $foo = $q->Vars;
        $p->receive_ping($p->get_tb_id($q), $foo, \&dump2warn );
        sub dump2warn {
                my $data=shift;
                foreach (keys %{ $data }) {     warn "$_ " . $data->{$_} }
        <!-- a sample discover pings -->
        use Net::TrackBack;

        my $url = '';
        $p=new Net::TrackBack;
        foreach ($p->discover($url)) { print "$_\n"; }
        if ($p->is_success) { print "A SUCCESS!\n"; }
        elsif ($p->is_error) { print "A FAILURE.\n". $p->message ."\n"; }

        <!-- a sample send ping -->
        use Net::TrackBack;

        $data{title}='foo title!';
        $data{excerpt}='foo is the word.';

        $p=new Net::TrackBack;
        print qq(Send Ping: $data{url})."\n";
        if ($p->is_success) { print "SUCCESS!\n" . $p->message ."\n"; }


This is a fairly rapid "OO modularization" of the TrackBack functionality found in the TrackBack reference implementation and specification. It removes the display and management features found in the reference implementation in addition to its reliance on I take no credit for the genius of TrackBack. Quite a bit of this modules code was derived from the Standalone TrackBack Implementation. My motivation in developing this module is to make experimentation and implementation of TrackBack functions a bit easier.

I've done a fair amount of testing of this module myself, but for now this module should be considered ALPHA software. In otherwords, the interface may change based on the feedback and usage patterns that emerge once this module circulates for a bit.

Your feedback and suggestions are greatly appreciated. There is still a lot of work to be done. This module is far from completed. See the TO DO section for some brief thoughts.

This modules requires the LWP package.


The following methods are available:

  • new

    Constructor for Net::TrackBack. Returns a reference to a Net::TrackBack object.

  • $p->receive_ping($tb_id,%data_in,\&code_ref)

    Processes a hash of data received for a TrackBack ID (identified by $tb_id) and, after some standardized processing passes the data to the routine referenced in code_ref for further processing -- saving the disk, email etc.

  • $p->send_ping(%data_out)

    Takes a hash of elements as defined in the trackBack specification and pings the resource specified in the ping_url element.

  • $p->discover($url)

    Routine that gets a web page specified by $url and extracts all TrackBack pings found. The pings are returned in a simple array.

  • $p->is_success()

    Returns a boolen according to the success of the last operation.

  • $p->is_error()

    Returns a boolen according to the failure of the last operation.

  • $p->message()

    Returns a human-readable message for the last operation.

  • $p->get_tb_id($CGIobj)

    A utility method for those working with Takes a reference to and extracts the TrackBack ping ID from the incoming request.




  • discover should probably return an array of hashes.

  • receive_ping does not handle namespaces properly. You're OK if you stick with the standard prefixes.

  • Does not support extended Dublin core elements such as &lt;dc:subject&gt; and so on.

  • Implement TrackBack threading feature?


The software is released under the Artistic License. The terms of the Artistic License are described at


Except where otherwise noted, Net::TrackBack is Copyright 2003, Timothy Appnel, All rights reserved.