Help for this page

Select Code to Download


  1. or download this
    CREATE TABLE `user` (
      `id` int unsigned NOT NULL auto_increment,
      `username` VARCHAR(100) NOT NULL,
    ...
      FOREIGN KEY (`user`) REFERENCES user(id),
      FOREIGN KEY (`role`) REFERENCES role(id)
    ) ENGINE=InnoDB;
    
  2. or download this
    MyApp::Schema::Result::User
    MyApp::Schema::Result::Role
    MyApp::Schema::Result::UserRole
    
  3. or download this
    # Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-02-28 19:1
    +4:54
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iS0oJWk28gjL7QD50cdRqQ
    
    ...
        }
        return;
    }
    
  4. or download this
    use overload '""' => sub {
        return +shift->name;
    }, fallback => 1;
    
  5. or download this
    my $attr = { RaiseError => 1,
                 AutoCommit => 1,
    ...
       "User ", $user->username,
        " has these roles: ",
         join(", ", $user->roles) || "none!", "\n";