Mojolicious::Plugin::ContextAuth::DB::Context - Context object for the ContextAuth database
version 0.01
my $db = Mojolicious::Plugin::ContextAuth::DB->new( dsn => 'sqlite:' . $file, ); my $context = Mojolicious::Plugin::ContextAuth::DB::Context->new( dbh => $db->dbh, ); my $new_context = $context->add( context_name => 'test', context_description => 'hallo', ); my $updated_context = $new_context->update( context_name => 'ernie', context_description => 'bert', ); # create context object with data for context id 1 my $found_context = $context->load( 1 ); # delete context $new_context->delete;
dbh
context_name
context_description
context_id
error
# create context object with data for context id 1 my $found_context = $context->load( 1 );
my $new_context = $context->add( contextname => 'test', context_password => 'hallo', );
my $updated_context = $new_context->update( contextname => 'ernie', context_password => 'bert', );
$context->delete;
$context->set_user_roles( user_id => 123, roles => [ 123, 456, 789, ], );
$context->set_role_users( role_id => 123, users => [ 123, 456, 789, ], );
my @user_ids = $context->role_users( role_id => 123, );
my @role_ids = $context->user_roles( user_id => 123, );
Renee Baecker <reneeb@cpan.org>
This software is Copyright (c) 2020 by Renee Baecker.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install Mojolicious::Plugin::ContextAuth, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::ContextAuth
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::ContextAuth
For more information on module installation, please visit the detailed CPAN module installation guide.