NAME

PurpleWiki::Transclusion - Transclusion object.

SYNOPSIS

use PurpleWiki::Config;
use PurpleWiki::Transclusion;

my $config = PurpleWiki::Config->new('/var/www/wikidb');
my $transclusion = PurpleWiki::Transclusion->new(
   config => $config,
   url => 'http://purplewiki.blueoxen.net/cgi-bin/wiki.pl?HomePage');

$transclusion->get('2H1');  # retrieves content of NID 2H1

DESCRIPTION

A first stab at transclusions in PurpleWiki. This is an extremely rudimentary prototype. It is not meant to be good by any stretch of the imagination. It is simply to demonstrate the possibilities that these features allow.

METHODS

new(%params)

Creates a new Transclusion object associated with the sequence.index in the DataDir. The index is used to find the URL from which a particular NID originates. See get() for more.

There are two parameters:

config -- PurpleWiki::Config object

   url -- The URL requesting the transclusion

get($nid)

Takes $nid, looks it up in the sequence.index and then uses HTTP to retrieve the page on which that NID is found. The retrieved page is parsed to gather the content associated with the NID. A string containing the content or an error message if it could not be obtained is returned.

AUTHORS

Chris Dent, <cdent@blueoxen.org>

Eugene Eric Kim, <eekim@blueoxen.org>