The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Name

CatalystX::Usul::UserProfiles - CRUD methods for user account profiles

Version

Describes v0.17.$Rev: 1 $

Synopsis

   use CatalystX::Usul::UserProfiles;

   $profile_obj = CatalystX::Usul::Model::UserProfiles->new( $config ) );

   $profile_obj->find( $profile );

Description

These methods maintain the user account profiles used by the user class to create new user accounts. This class inherits from File::DataClass::Schema which provides the necessary CRUD methods. Data is stored in the user_profiles.json file in the ctrldir

Configuration and Environment

Defines the following attributes

+result_source_attributes

Defines the result source attributes for the schema class

source_name

A string which defaults to profile

Subroutines/Methods

create

   $self->create( $hash_ref_of_fields_and_values );

Creates a new profile. Calls the create method on the resultset provided by calling the "resultset" method

delete

   $self->delete( $profile );

Deletes the named profile. Calls the delete method on the resultset provided by calling the "resultset" method

find

   $profile_obj = $self->find( $profile );

Finds and returns a profile object. Calls the find method on the resultset provided by calling the "resultset" method

list

   $list_obj = $self->list( $profile );

Calls the list method on the resultset provided by calling the "resultset" method. The list object has a result attribute which is the return value from "find" and a list of defined profiles

resultset

   $resultset = $self->resultset;

Returns a File::DataClass::ResultSet object. Calls the parent class resultset method passing in the hard coded result source name which is profile

source

   $source = $self->source;

Returns a File::DataClass::ResultSource object. Calls the parent class source method passing in the hard coded result source name which is profile

update

   $self->update( $hash_ref_of_fields_and_values );

Updates an existing profile. Calls the update method on the resultset provided by calling the "resultset" method

Diagnostics

None

Dependencies

CatalystX::Usul::Moose
File::DataClass::Constants
File::DataClass::Schema

Incompatibilities

There are no known incompatibilities in this module

Bugs and Limitations

There are no known bugs in this module. Please report problems to the address below. Patches are welcome

Author

Peter Flanigan, <Support at RoxSoft.co.uk>

License and Copyright

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