| Data-Phrasebook documentation | Contained in the Data-Phrasebook distribution. |
Data::Phrasebook::Loader::Base - Base loader plugin class.
$class->new( %attributes );
Data::Phrasebook::Loader::Base acts as a base class for phrasebook
plugins.
new instantiates the plugin object, creating a blessed hash of any
attributes passed as arguments.
load is an abstract method here. You must define your own in your
subclass. Loads the phrasebook.
get is an abstract method here. You must define your own in your
subclass. Gets the phrase.
dicts is an abstract method here. You must define your own in your
subclass. Returns the list of dictionaries available.
keywords is an abstract method here. You must define your own in your
subclass. Returns the list of keywords available.
Returns the current class of loader.
Please see the README file.
Barbie, <barbie@cpan.org> for Miss Barbell Productions <http://www.missbarbell.co.uk>.
Copyright (C) 2004-2010 Barbie for Miss Barbell Productions. This module is free software; you can redistribute it and/or modify it under the Artistic Licence v2.
| Data-Phrasebook documentation | Contained in the Data-Phrasebook distribution. |
package Data::Phrasebook::Loader::Base; use strict; use warnings FATAL => 'all'; use base qw( Data::Phrasebook::Debug ); use Carp qw( croak ); use vars qw($VERSION); $VERSION = '0.31';
my $something = 0;
sub new { my $self = shift; my %hash = @_; ($hash{class}) = $self =~ /.*::(.*)$/; $self->store(3,"$self->new IN") if($self->debug); my $atts = \%hash; bless $atts, $self; return $atts; }
sub load { return } sub get { return } sub dicts { return () } sub keywords { return () } sub class { return shift->{class} } 1; __END__