Pdoc::Html::Converters::Modules

ModuleI

Summary Package variables Synopsis Description General documentation Methods

Summary
Pdoc::Html::Converters::Modules::ModuleI - Html converter module interface.
Package variables top
Globals (from use vars definitions)
$VERSION = do { my @r = (q$$Revision: 1.1.1.1 $ =~ /\d+/g); sprintf "%d."."%02d" x $
Included modulestop
Carp qw ( cluck confess )
strict
Synopsistop
use of an HTML converter module object should be:

use Pdoc::Html::Converters::Modules::SomeModule;

# Creates new converter module object
my $converter = Pdoc::Html::Converters::Modules::SomeModule->new();

# Get a document entry (of type Pdoc::DocEntryI)
my $docEntry = Get_doc_entry();

# Convert the document entry object
$docEntry = $converter->convert($docEntry);

# Now the document entry object should have its 'converted' content in HTML
if ($docEntry) {
print $docEntry->name(), "\n", $docEntry->converted();
}
Descriptiontop
Pdoc::Html::Converters::Modules::ModuleI is the interface to HTML converter modules. The only scope of the interface is to provide an abstract base class for HTML converter modules. None of the methods in the interface can be instantiated.
Methodstop
_initDescriptionCode
_invalidCallNo descriptionCode
convertDescriptionCode
newDescriptionCode
typeDescriptionCode

Methods description

_initcodetopprevnext
Pdoc::Html::Converters::Modules::ModuleI::_init is a private method used to define internal parameters.
convertcodetopprevnext
    $docEntry = $converter->convert($docEntry);
print $docEntry->name(), "\n", $docEntry->converted();

Pdoc::Html::Converters::Modules::ModuleI::convert takes a document entry object (Pdoc::DocEntryI) as unique argument. The method will convert the object content into HTML and store it in as the 'converted' part.
newcodetopprevnext
    my $docEntry = Pdoc::Html::Converters::Modules::ModuleI->new();

Pdoc::Html::Converters::Modules::ModuleI::new method creates a new HTML converter module object.
typecodetopprevnext
Pdoc::Html::Converters::Modules::ModuleI::type returns the type of object converted.

Methods code

_initdescriptiontopprevnext
sub _init {
    shift->_invalidCall();
}
_invalidCalldescriptiontopprevnext
sub _invalidCall {
  my $self = shift;
  my $package = ref $self || $self;
  my $thispack = (caller)[0];
  my $caller = (caller)[1];
  
  confess "Abstract method '$caller' defined in interface $thispack not implemented by pacakge $package";
}
convertdescriptiontopprevnext
sub convert {
    shift->_invalidCall();
}
newdescriptiontopprevnext
sub new {
    shift->_invalidCall();
}
typedescriptiontopprevnext
sub type {
    shift->_invalidCall();
}

General documentation

AUTHOR top
Copyright (c) 2000 by Raphael Leplae (lp1@sanger.ac.uk). All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.