NAME
EBook::MOBI::Driver - Interface for plugins.
Thid module helps you to write an input plugin for EBook::MOBI
.
SYNOPSIS
Some example code snippets are provided here. For a complete example, please have a look at EBook::MOBI::Driver::Example.
# Plugin for EBook::MOBI
use EBook::MOBI::Driver;
our @ISA = ('EBook::MOBI::Driver');
sub parse {
my ($self, $input) = @_;
# your code to convert input to output
return $output;
}
sub set_options {
my $self = shift;
my $args = shift;
# call the args like this
if (ref($args) eq "HASH") {
if ($args->{YOUR_ARG_NAME}) {
# do your stuff
}
}
}
IMPLEMENTED METHODS
new
Saves a plugin the need to write this one.
debug_on
Enable debugging by passing a sub.
debug_off
Stop debug messages.
debug_msg
Write a debug message.
EMPTY METHODS
parse
Should be implemented by the plugin! Takes a string, returns a string.
set_options
Should be implemented by the plugin! Takes a hash ref with arguments.
COPYRIGHT & LICENSE
Copyright 2012, 2013 Boris Däppen, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms of Artistic License 2.0.
AUTHOR
Boris Däppen <bdaeppen.perl@gmail.com>