Data-Context
view release on metacpan or search on metacpan
lib/Data/Context/Instance.pm view on Meta::CPAN
__END__
=head1 NAME
Data::Context::Instance - The in memory instance of a data context config file
=head1 VERSION
This documentation refers to Data::Context::Instance version 0.3.
=head1 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);
=head1 DESCRIPTION
=head1 SUBROUTINES/METHODS
=head2 C<init()>
Initialises the instance ie it reads the config file and merges in the parent if found
=head2 C<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.
=head2 C<get_data ( $vars )>
Returns the data from the config file processed with the context of $vars
=head2 C<process_data( $count, $data, $path )>
This does the magic of processing the data, and in the future handling of the
data event loop.
=head1 DIAGNOSTICS
=head1 CONFIGURATION AND ENVIRONMENT
=head1 DEPENDENCIES
=head1 INCOMPATIBILITIES
=head1 BUGS AND LIMITATIONS
There are no known bugs in this module.
Please report problems to Ivan Wills (ivan.wills@gmail.com).
Patches are welcome.
=head1 AUTHOR
Ivan Wills - (ivan.wills@gmail.com)
=head1 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 L<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.
=cut
( run in 0.471 second using v1.01-cache-2.11-cpan-39bf76dae61 )