CatalystX::CRUD::Model::File - filesystem CRUD model
package MyApp::Model::Foo; use base qw( CatalystX::CRUD::Model::File ); __PACKAGE__->config->{object_class} = 'MyApp::File'; __PACKAGE__->config->{inc_path} = [ '/some/path', '/other/path' ]; 1;
CatalystX::CRUD::Model::File is an example implementation of CatalystX::CRUD::Model.
Only new or overridden methods are documented here.
Implements the CXC::Model API. Sets the inc_path config (if not already set) to the root config value.
inc_path
root
Return a new CatalystX::CRUD::Object::File object.
Read path/to/file from disk and return a CXCO::File object.
path/to/file is assumed to be in inc_path
If path/to/file is empty or cannot be found, undef is returned.
Returns the include path from config(). The include path is searched by search(), count() and iterator().
Returns a wanted subroutine suitable for File::Find.
# TODO regex vs exact match
Uses File::Find to search through inc_path() for files. filter_CODE should be a CODE ref matching format returned by make_query(). If not set, make_query() is called by default.
Returns an array ref of CXCO::File objects.
Returns number of files matching filter_CODE. See search for a description of filter_CODE.
Acts same as search() but returns a CatalystX::CRUD::Iterator::File object instead of a simple array ref.
Peter Karman, <perl at peknet.com>
<perl at peknet.com>
Please report any bugs or feature requests to bug-catalystx-crud at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CatalystX-CRUD. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-catalystx-crud at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc CatalystX::CRUD
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/CatalystX-CRUD
CPAN Ratings
http://cpanratings.perl.org/d/CatalystX-CRUD
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=CatalystX-CRUD
Search CPAN
http://search.cpan.org/dist/CatalystX-CRUD
Copyright 2007 Peter Karman, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install CatalystX::CRUD, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CatalystX::CRUD
CPAN shell
perl -MCPAN -e shell install CatalystX::CRUD
For more information on module installation, please visit the detailed CPAN module installation guide.