NAME
Mojolicious::Plugin::ContextAuth::DB::Resource - Resource object for the ContextAuth database
VERSION
version 0.01
SYNOPSIS
my
$db
= Mojolicious::Plugin::ContextAuth::DB->new(
dsn
=>
'sqlite:'
.
$file
,
);
my
$resource
= Mojolicious::Plugin::ContextAuth::DB::resource->new(
dbh
=>
$db
->dbh,
);
my
$new_resource
=
$resource
->add(
resource_name
=>
'test'
,
resource_description
=>
'hallo'
,
);
my
$updated_resource
=
$new_resource
->update(
resource_name
=>
'ernie'
,
resource_description
=>
'bert'
,
);
# create resource object with data for resource id 1
my
$found_resource
=
$resource
->load( 1 );
# delete resource
$new_resource
->
delete
;
ATTRIBUTES
dbh
resource_name
resource_description
resource_id
error
METHODS
load
# create resource object with data for resource id 1
my
$found_resource
=
$resource
->load( 1 );
add
my
$new_resource
=
$resource
->add(
resourcename
=>
'test'
,
resource_password
=>
'hallo'
,
);
update
my
$updated_resource
=
$new_resource
->update(
resourcename
=>
'ernie'
,
resource_password
=>
'bert'
,
);
delete
$resource
->
delete
;
search
AUTHOR
Renee Baecker <reneeb@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2020 by Renee Baecker.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)