Skip to content
Snippets Groups Projects
Verified Commit cebcb420 authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

signatures

parent 454cfd77
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@ package CF::Schema::Result::User;
use strict;
use warnings;
use feature 'signatures';
no warnings qw{ experimental::signatures };
use base 'DBIx::Class::Core';
......@@ -43,8 +45,7 @@ __PACKAGE__->has_many(
{ 'foreign.user_id' => 'self.id', },
);
sub formatted {
my $self = shift;
sub formatted($self) {
my $user = {
$self->get_columns,
......@@ -56,9 +57,7 @@ sub formatted {
}
sub set_secret {
my $self = shift;
my $new = shift;
sub set_secret($self, $new='') {
return if $self->secret and not $new;
......@@ -70,10 +69,7 @@ sub set_secret {
}
sub update_roles {
my $self = shift;
my $roles_hash = shift;
sub update_roles ($self, $roles_hash) {
$self->update({
roles => join ' ', sort keys %{ $roles_hash }
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment