NAME
App::Followme::ConfiguredObject - Base class for App::Followme classes
SYNOPSIS
use App::Followme::ConfiguredObject;
my $obj = App::Followme::ConfiguredObjects->new($configuration);
DESCRIPTION
This class creates a new configured object. All classes in App::Followme are subclassed from it. The new method creates a new object and initializes the parameters from the configuration file.
- $obj = ConfiguredObject->new($configuration);
-
Create a new object from the configuration. The configuration is a reference to a hash containing fields with the same names as the object parameters. Fields in the configuration whose name does not match an object parameter are ignored. If a configuration field ends in "_pkg", its value is assumed to be the name of a subpackage, which is is created and stored in a field whose name is stripped of the "_pkg" suffix.
- %parameters = $self->parameters();
-
Returns a hash of the default values of the object's parameters.
- $self->setup(%configuration);
-
Sets those parameters of the object which are computed when the object is initialized.
CONFIGURATION
The following fields in the configuration file are used in this class and every class based on it:
- base_directory
-
The directory containing the configuration file that loads the class. The default value is the current directory.
- case_sensitvity
-
Boolean flag that indicates if filenames on this operating system are case sensitive. The default value is false.
- quick_mode
-
A flag indicating application is run in quick mode.
- top_directory
-
The top directory of the website. The default value is the current directory.
LICENSE
Copyright (C) Bernie Simon.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Bernie Simon <bernie.simon@gmail.com>