- 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;
- or download this
MyApp::Schema::Result::User
MyApp::Schema::Result::Role
MyApp::Schema::Result::UserRole
- 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;
}
- or download this
use overload '""' => sub {
return +shift->name;
}, fallback => 1;
- or download this
my $attr = { RaiseError => 1,
AutoCommit => 1,
...
"User ", $user->username,
" has these roles: ",
join(", ", $user->roles) || "none!", "\n";