Class::Usul::File - Data loading and dumping
package YourClass; use Class::Usul::File; my $file_obj = Class::Usul::File->new( builder => Class::Usul->new );
Provides data loading and dumping methods, Also temporary file methods and directories instantiated using the Class::Usul::Config object
$self->dump( @args );
Accepts either a list or a hash ref. Calls "dataclass_schema" with the storage_class attribute if supplied. Calls the dump method
$hash_ref = $self->load( @args );
Accepts either a list or a hash ref. Calls "dataclass_schema" with the storage_class and arrays attributes if supplied. Calls the load method
$f_dc_schema_obj = $self->dataclass_schema( $attrs );
Returns a File::DataClass::Schema object. Object uses our exception_class, no caching and no locking by default. Works as a class method
exception_class
$self->delete_tmp_files( $dir );
Delete this processes temporary files. Files are in the $dir directory which defaults to $self->tempdir
$dir
$self->tempdir
$temporary_directory = $self->tempdir;
Returns $self->config->tempdir or "tmpdir" in File::Spec
$self->config->tempdir
$tempfile_obj = $self->tempfile( $dir );
Returns a File::Temp object in the $dir directory which defaults to $self->tempdir. File is automatically deleted if the $tempfile_obj reference goes out of scope
$tempfile_obj
$pathname = $self->tempname( $dir );
Returns the pathname of a temporary file in the given directory which defaults to $self->tempdir. The file will be deleted by "delete_tmp_files" if it is called otherwise it will persist
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, <Support at RoxSoft.co.uk>
<Support at RoxSoft.co.uk>
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 Class::Usul, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::Usul
CPAN shell
perl -MCPAN -e shell install Class::Usul
For more information on module installation, please visit the detailed CPAN module installation guide.