Add EXE_FILES to Makefile.PL
[gruntmaster-data.git] / lib / Gruntmaster / Data.pm
CommitLineData
4ed3f8e7 1use utf8;
bbf8209c 2package Gruntmaster::Data;
4ed3f8e7
MG
3
4# Created by DBIx::Class::Schema::Loader
5# DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7use strict;
bbf8209c 8use warnings;
014ee8a6 9
4ed3f8e7
MG
10use base 'DBIx::Class::Schema';
11
12__PACKAGE__->load_namespaces;
014ee8a6 13
f7386aab 14
4ed3f8e7
MG
15# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-03-05 13:11:39
16# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dAEmtAexvUaNXLgYz2rNEg
17
18our $VERSION = 5999.000_003;
19
20use Lingua::EN::Inflect qw/PL_N/;
21use Sub::Name qw/subname/;
014ee8a6
MG
22
23sub dynsub{
fb6a4e3d 24 our ($name, $sub) = @_;
014ee8a6 25 no strict 'refs';
fb6a4e3d 26 *$name = subname $name => $sub
014ee8a6
MG
27}
28
29BEGIN {
4ed3f8e7
MG
30 for my $rs (qw/contest contest_problem job open problem user/) {
31 my $rsname = ucfirst $rs;
32 $rsname =~ s/_([a-z])/\u$1/g;
33 dynsub PL_N($rs) => sub { $_[0]->resultset($rsname) };
34 dynsub $rs => sub { $_[0]->resultset($rsname)->find($_[1]) };
014ee8a6
MG
35 }
36}
37
f7386aab 381;
4a8747ef
MG
39
40__END__
41
42=encoding utf-8
43
44=head1 NAME
45
46Gruntmaster::Data - Gruntmaster 6000 Online Judge -- database interface and tools
47
48=head1 SYNOPSIS
49
50 my $db = Gruntmaster::Data->connect('dbi:Pg:');
51 # Typical DBIC stuff here
52
53=head1 DESCRIPTION
54
55No documentation (yet)
56
57=head1 AUTHOR
58
59Marius Gavrilescu E<lt>marius@ieval.roE<gt>
60
61=head1 COPYRIGHT AND LICENSE
62
63Copyright (C) 2014 by Marius Gavrilescu
64
9d2e740e
MG
65This library is free software; you can redistribute it and/or modify
66it under the same terms as Perl itself, either Perl version 5.18.1 or,
67at your option, any later version of Perl 5 you may have available.
4a8747ef
MG
68
69
70=cut
This page took 0.015355 seconds and 4 git commands to generate.