NAME
Modwheel::Instance - Base class for modwheel application components.
VERSION
v0.2.2
SYNOPSIS
package Modwheel::MyPackage;
use strict;
use warnings;
use version; our $VERSION = qv('1.0.0');
use Class::InsideOut::Policy::Modwheel qw( :std );
use base qw( Modwheel::Instance );
{
sub hello_world {
my ($self) = @_;
my $modwheel = $self->modwheel;
$modwheel->loginform("Hello World!");
}
}
package main;
use strict;
use warnings;
my $pkg = Modwheel::MyPackage->new({
modwheel => $modwheel,
db => $db,
user => $user,
object => $object,
repository => $repository,
template => $template,
});
DESCRIPTION
This is the base class for Modwheel applications. It ensures communication between the Modwheel components.
SUBROUTINES/METHODS
CONSTRUCTOR
ATTRIBUTES
$self->modwheel()
$self->set_modwheel($modwheel)
-
The Modwheel object,
$self->user()
$self->set_user($user)
-
Access/set the current object for working with users and authentication.
$self->db()
$self->set_db($db)
-
Access/set the current object for working with databases.
$self->object()
$self->set_object($object)
-
Access/set the current object for working with Modwheel data objects.
$self->template()
$self->set_template($template)
-
Access/set the current object for working with templates.
$self->repository()
$self->set_repository()
-
Access/set the current object for working with file repositories.
INSTANCE METHODS
$self->setup_instance({db =
$db, user => $user ...})>-
Shortcut for set_db, set_user, set_template, set_object, set_repository.
DIAGNOSTICS
None.
CONFIGURATION AND ENVIRONMENT
Nothing configurable.
DEPENDENCIES
INCOMPATIBILITIES
None.
BUGS AND LIMITATIONS
None.
AUTHOR
Ask Solem, ask@0x61736b.net.
LICENSE AND COPYRIGHT
Copyright (C) 2007 by Ask Solem ask@0x61736b.net
.
All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.