NAME
Data::Context::Instance - The in memory instance of a data context config file
VERSION
This documentation refers to Data::Context::Instance version 0.3.
SYNOPSIS
use Data::Context::Instance;
# create a new object
my $dci = Data::Context::Instance->new(
path => 'dir/file',
file => Path::Tiny::path('path/to/dir/file.dc.js'),
type => 'js',
dc => $dc,
);
# Initialise the object (done by get normally)
$dci->init;
# get the data (with the context of $vars)
my $data = $dci->get_data($vars);
DESCRIPTION
SUBROUTINES/METHODS
init()
Initialises the instance ie it reads the config file and merges in the parent if found
changed ()
Returns true if any of the files that go into this instance have changed (or if they haven't yet been processed) and returns false if this instance is still valid.
get_data ( $vars )
Returns the data from the config file processed with the context of $vars
process_data( $count, $data, $path )
This does the magic of processing the data, and in the future handling of the data event loop.
DIAGNOSTICS
CONFIGURATION AND ENVIRONMENT
DEPENDENCIES
INCOMPATIBILITIES
BUGS AND LIMITATIONS
There are no known bugs in this module.
Please report problems to Ivan Wills (ivan.wills@gmail.com).
Patches are welcome.
AUTHOR
Ivan Wills - (ivan.wills@gmail.com)
LICENSE AND COPYRIGHT
Copyright (c) 2012 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.