Pdoc::Html::Converters::Modules
ModuleI
Pdoc::Html::Converters::Modules::ModuleI - Html converter module interface.
|
| Globals (from use vars definitions) |
| $VERSION = do { my @r = (q$$Revision: 1.1.1.1 $ =~ /\d+/g); sprintf "%d."."%02d" x $ |
| Carp qw ( cluck confess ) |
| strict |
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(); }
|
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.
|
Methods description
Pdoc::Html::Converters::Modules::ModuleI::_init is a private method used to define internal parameters.
$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.
my $docEntry = Pdoc::Html::Converters::Modules::ModuleI->new();
Pdoc::Html::Converters::Modules::ModuleI::new method creates a new HTML converter module object.
Pdoc::Html::Converters::Modules::ModuleI::type returns the type of object converted.
Methods code
sub _init
{ shift->_invalidCall();
}
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";
}
sub convert
{ shift->_invalidCall();
}
sub new
{ shift->_invalidCall();
}
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.
|