PurpleWiki::Transclusion - Transclusion object.


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

  my $config = PurpleWiki::Config->new('/var/www/wikidb');
  my $transclusion = PurpleWiki::Transclusion->new(
     url => '',
     ouput_type => 'plaintext');

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


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.



Creates a new Transclusion object. See get() for more.

There are three parameters:

          url -- The URL requesting the transclusion

   outputType -- plaintext, xhtml or undef (defaults to xhtml)


Takes $nid, looks it up using PurpleWiki::Sequence 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.

If the PurpleWiki::Config has defined httpUser and httpPass, that information will be passed along with the HTTP request to authenticate.


Returns the URL associated with the NID. This can be useful for displaying the URL.


Chris Dent, <>

Eugene Eric Kim, <>