Help for this page

Select Code to Download


  1. or download this
    package MyApp::Schema::Result::User;
    
    ...
      { role => "role" },
      { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE"
    + },
    );
    
  2. or download this
    foreach my $page ($c->user->pages) {
        # do something with $page
    }
    
  3. or download this
    sub pages {
        my ($self) = @_;
    ...
            }
        );
    }
    
  4. or download this
    package MyApp::Schema::ResultSet::RolePage;
    
    ...
    extends qw/MyApp::Schema::ResultSetX::DisplayTable/;
    
    has '+name' => ( default => 'RolePage' );
    
  5. or download this
    sub pages {
      my $self = shift;
    ...
        # Alternatively, if you need to eliminate duplicates:
        # ->search_related('page_name', {}, {distinct => 1});
    }