File::DataClass::ResultSource - A source of result sets for a given schema
use File::DataClass::Schema; $schema = File::DataClass::Schema->new ( path => [ qw(path to a file) ], result_source_attributes => { source_name => {}, }, tempdir => [ qw(path to a directory) ] ); $schema->source( q(source_name) )->attributes( [ qw(list of attr names) ] ); $rs = $schema->resultset( q(source_name) ); $result = $rs->find( { name => q(id of field element to find) } ); $result->$attr_name( $some_new_value ); $result->update; @result = $rs->search( { 'attr name' => q(some value) } );
Provides new result sources for a given schema
This is the base class for schema definitions. Each element in a data file requires a schema definition to define it's attributes that should inherit from this
Defines the following attributes
Array ref of attributes defined in this result source
@attributes = $self->columns;
Returns a list of attributes
$bool = $self->has_column( $attribute_name );
Predicate return true if the attribute exists, false otherwise
$rs = $self->resultset;
Creates and returns a new File::DataClass::ResultSet object
None
There are no known incompatibilities in this module
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Peter Flanigan, <pjfl@cpan.org>
<pjfl@cpan.org>
Copyright (c) 2014 Peter Flanigan. All rights reserved
This program 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 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
To install File::DataClass, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::DataClass
CPAN shell
perl -MCPAN -e shell install File::DataClass
For more information on module installation, please visit the detailed CPAN module installation guide.