Help for this page

Select Code to Download


  1. or download this
    # In MyApp::Schema::Class
    =item B<has_role>
    ...
        }
        return;
    }
    
  2. or download this
    # in MyApp::Schema::Role
    use overload '""' => sub {
        return +shift->name;
    }, fallback => 1;
    
  3. or download this
    if ( $user->has_role("admin") )
    {
        # authorized for admin stuff...
    }
    
  4. or download this
    MyApp::Schema::Result::User
    MyApp::Schema::Result::Role
    MyApp::Schema::Result::UserRole