Andreas 'ac0v' Specht > Hyper > Hyper::Config::Reader

Download:
Hyper-v0.05.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  1
View/Report Bugs
Module Version: v0.01   Source  

NAME ^

Hyper::Config::Reader - abstract base class for all config objects.

VERSION ^

This document describes Hyper::Config::Reader 0.01

SYNOPSIS ^

    package Hyper::Config::Reader::Sample;

    use Class::Std::Storable;
    use base qw(Hyper::Config::Reader);

    sub _read_config :RESTRICTED {
        my $self = shift;
        my $ini  = shift; # Config::IniFile

        # fetch data into objects / or attributes

        return $self;
    }

    1;

DESCRIPTION ^

Hyper::Config reads config files and calls _read_config of the inheriting class to parse the config.

ATTRIBUTES ^

base_path :get :init_arg :default<()>
file :name :default<()>

SUBROUTINES/METHODS ^

START

    Hyper::Config::Sample->new({ for_class => 'Hyper::Control::Base::BBase' });

or

    Hyper::Config::Sample->new({ for_class => Hyper::Control::Base::BBase->new() });

or

    Hyper::Config::Sample->new({ file => '/etc/passwd' });

Reads config from an ini file. You can pass the filename directly via the param file or via passing the for_class param. The file param has precedence. If for_class param is used we try to get our config with replacing the '::' chars of the class name with '/', prepeding the base path and adding the prefix .ini.

DIAGNOSTICS ^

CONFIGURATION AND ENVIRONMENT ^

DEPENDENCIES ^

INCOMPATIBILITIES ^

BUGS AND LIMITATIONS ^

RCS INFORMATIONS ^

Last changed by
 $Author: ac0v $
Id
 $Id: Reader.pm 317 2008-02-16 01:52:33Z ac0v $
Revision
 $Revision: 317 $
Date
 $Date: 2008-02-16 02:52:33 +0100 (Sa, 16 Feb 2008) $
HeadURL
 $HeadURL: http://svn.hyper-framework.org/Hyper/Hyper/tags/0.05/lib/Hyper/Config/Reader.pm $

AUTHOR ^

Andreas Specht <ACID@cpan.org>

LICENSE AND COPYRIGHT ^

Copyright (c) 2007, Andreas Specht <ACID@cpan.org>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: