Show
Ignore:
Timestamp:
10/23/07 01:30:10 (2 years ago)
Author:
eevee
Message:

I discovered that DBIx::Class::Schema::Loader had been filling my table classes with lines of the form __PACKAGE__->add_unique_constraint(['id'], undef); erroneously, due to someone's inadvertently iterating over %hash rather than keys %hash. Not only were these lines redundant in the case of a primary key, but the parameters are supposed to be a name and a list of columns: thus I had a lot of constraints with ARRAY(0x...) as names and no columns. This was thoroughly breaking $schema->deploy, as it was trying to create indices with garbage names that looked like functions. I have, obviously, removed them all.
In the process, I have done something I've been meaning to do for a while: cleaned up the source in every single file to match my usual style. No auto-gen comment, no redundant loading of PK::Auto, no double-newline after the 1;, proper POD, use of qw// for passing lists, etc. This is actually a teeny part of my db cleanup tracking bug. (#58)

Location:
veekun/trunk/lib/Vee/Schema
Files:
36 modified

Legend:

Unmodified
Added
Removed
  • veekun/trunk/lib/Vee/Schema/Abilities.pm

    r109 r350  
    11package Vee::Schema::Abilities; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("abilities"); 
    12 __PACKAGE__->add_columns("id", "name", "gameblurb", "effect"); 
    13 __PACKAGE__->set_primary_key("id"); 
    14 __PACKAGE__->add_unique_constraint(["id"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::Abilities - DBIC class for the C<abilities> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('abilities'); 
     15__PACKAGE__->add_columns(qw/ id name gameblurb effect /); 
     16__PACKAGE__->set_primary_key('id'); 
    1517 
    1618__PACKAGE__->has_many(pokemon_abilities => 'Vee::Schema::PokemonAbilities', 'abilityid'); 
    1719__PACKAGE__->many_to_many(pokemon => 'pokemon_abilities', 'pokemon'); 
    1820 
     21=head1 SEE ALSO 
     22 
     23L<Vee::Schema>, L<DBIx::Class> 
     24 
     25=head1 AUTHOR 
     26 
     27Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     28 
     29See the included F<AUTHORS> file for a full list of contributers. 
     30 
     31=head1 LICENSE 
     32 
     33See the included F<LICENSE> file. 
     34 
     35=cut 
     36 
    19371; 
    20  
  • veekun/trunk/lib/Vee/Schema/Berries.pm

    r212 r350  
    11package Vee::Schema::Berries; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("berries"); 
     7=head1 NAME 
     8 
     9Vee::Schema::Berries - DBIC class for the C<berries> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('berries'); 
    1215__PACKAGE__->add_columns(qw/ id size firmness max_harvest growth_time soil_dryness spicy dry sweet bitter sour smoothness /); 
    13 __PACKAGE__->set_primary_key("id"); 
    14 __PACKAGE__->add_unique_constraint(["id"], undef); 
     16__PACKAGE__->set_primary_key('id'); 
    1517 
    1618__PACKAGE__->belongs_to(item => 'Vee::Schema::Items', { 'foreign.berry_id' => 'self.id' }); 
    1719 
     20=head1 SEE ALSO 
     21 
     22L<Vee::Schema>, L<DBIx::Class> 
     23 
     24=head1 AUTHOR 
     25 
     26Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     27 
     28See the included F<AUTHORS> file for a full list of contributers. 
     29 
     30=head1 LICENSE 
     31 
     32See the included F<LICENSE> file. 
     33 
     34=cut 
     35 
    18361; 
    19  
  • veekun/trunk/lib/Vee/Schema/ContestMoves.pm

    r31 r350  
    11package Vee::Schema::ContestMoves; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("contestmoves"); 
    12 __PACKAGE__->add_columns("id", "appeal", "jam", "description", "effect"); 
    13 __PACKAGE__->set_primary_key("id"); 
    14 __PACKAGE__->add_unique_constraint(["id"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::ContestMoves - DBIC class for the C<contestmoves> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('contestmoves'); 
     15__PACKAGE__->add_columns(qw/ id appeal jam description effect /); 
     16__PACKAGE__->set_primary_key('id'); 
     17 
     18=head1 SEE ALSO 
     19 
     20L<Vee::Schema>, L<DBIx::Class> 
     21 
     22=head1 AUTHOR 
     23 
     24Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     25 
     26See the included F<AUTHORS> file for a full list of contributers. 
     27 
     28=head1 LICENSE 
     29 
     30See the included F<LICENSE> file. 
     31 
     32=cut 
    1533 
    16341; 
    17  
  • veekun/trunk/lib/Vee/Schema/Creators.pm

    r31 r350  
    11package Vee::Schema::Creators; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("creators"); 
    12 __PACKAGE__->add_columns("id", "userid", "name", "itemct"); 
    13 __PACKAGE__->set_primary_key("id"); 
    14 __PACKAGE__->add_unique_constraint("userid", ["userid"]); 
    15 __PACKAGE__->add_unique_constraint(["userid"], undef); 
    16 __PACKAGE__->add_unique_constraint(["id"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::Creators - DBIC class for the C<creators> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('creators'); 
     15__PACKAGE__->add_columns(qw/ id userid name itemct /); 
     16__PACKAGE__->set_primary_key('id'); 
     17__PACKAGE__->add_unique_constraint(userid => ['userid']); 
     18 
     19=head1 SEE ALSO 
     20 
     21L<Vee::Schema>, L<DBIx::Class> 
     22 
     23=head1 AUTHOR 
     24 
     25Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     26 
     27See the included F<AUTHORS> file for a full list of contributers. 
     28 
     29=head1 LICENSE 
     30 
     31See the included F<LICENSE> file. 
     32 
     33=cut 
    1734 
    18351; 
    19  
  • veekun/trunk/lib/Vee/Schema/Edits.pm

    r31 r350  
    11package Vee::Schema::Edits; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("edits"); 
    12 __PACKAGE__->add_columns("id", "postid", "userid", "time", "oldmessage"); 
    13 __PACKAGE__->set_primary_key("id"); 
    14 __PACKAGE__->add_unique_constraint(["id"], undef); 
     7=head1 NAME 
    158 
    16 #__PACKAGE__->belongs_to(post => 'Vee::Schema::Posts', 'postid'); 
    17 #__PACKAGE__->belongs_to(user => 'Vee::Schema::Users', 'userid'); 
    18 # have to use might_have because more often than not there is no edit row for a post and that fucks everything up 
     9Vee::Schema::Edits - DBIC class for the C<edits> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('edits'); 
     15__PACKAGE__->add_columns(qw/ id postid userid time oldmessage /); 
     16__PACKAGE__->set_primary_key('id'); 
    1917 
    2018__PACKAGE__->might_have(post => 'Vee::Schema::Posts', { 'foreign.id' => 'self.postid' }); 
    2119__PACKAGE__->might_have(user => 'Vee::Schema::Users', { 'foreign.id' => 'self.userid' }); 
    2220 
     21=head1 SEE ALSO 
     22 
     23L<Vee::Schema>, L<DBIx::Class> 
     24 
     25=head1 AUTHOR 
     26 
     27Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     28 
     29See the included F<AUTHORS> file for a full list of contributers. 
     30 
     31=head1 LICENSE 
     32 
     33See the included F<LICENSE> file. 
     34 
     35=cut 
     36 
    23371; 
    24  
  • veekun/trunk/lib/Vee/Schema/ErrorLog.pm

    r31 r350  
    11package Vee::Schema::ErrorLog; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("errorlog"); 
    12 __PACKAGE__->add_columns("id", "time", "userid", "ip", "path", "method", "query", "error"); 
    13 __PACKAGE__->set_primary_key("id"); 
    14 __PACKAGE__->add_unique_constraint(["id"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::ErrorLog - DBIC class for the C<errorlog> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('errorlog'); 
     15__PACKAGE__->add_columns(qw/ id time userid ip path method query error /); 
     16__PACKAGE__->set_primary_key('id'); 
     17 
     18=head1 SEE ALSO 
     19 
     20L<Vee::Schema>, L<DBIx::Class> 
     21 
     22=head1 AUTHOR 
     23 
     24Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     25 
     26See the included F<AUTHORS> file for a full list of contributers. 
     27 
     28=head1 LICENSE 
     29 
     30See the included F<LICENSE> file. 
     31 
     32=cut 
    1533 
    16341; 
  • veekun/trunk/lib/Vee/Schema/EvChains.pm

    r313 r350  
    11package Vee::Schema::EvChains; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
     
    1512# only because that's not a real chain anyway. 
    1613 
    17 __PACKAGE__->load_components("PK::Auto", "Core"); 
    18 __PACKAGE__->table("evchains"); 
    19 __PACKAGE__->add_columns( 
    20   "id", 
    21   "base", 
    22   "growth", 
    23   "chain", 
    24   "steps", 
    25   "babygs", 
    26   "babyc", 
    27   "babyrusa", 
    28   "baby_item", 
    29 ); 
    30 __PACKAGE__->set_primary_key("id"); 
    31 __PACKAGE__->add_unique_constraint(["id"], undef); 
     14=head1 NAME 
     15 
     16Vee::Schema::EvChains - DBIC class for the C<evchains> table 
     17 
     18=cut 
     19 
     20__PACKAGE__->load_components('Core'); 
     21__PACKAGE__->table('evchains'); 
     22__PACKAGE__->add_columns(qw/ 
     23    id 
     24    base 
     25    growth 
     26    chain 
     27    steps 
     28 
     29    babygs 
     30    babyc 
     31    babyrusa 
     32 
     33    baby_item 
     34/); 
     35__PACKAGE__->set_primary_key('id'); 
    3236 
    3337__PACKAGE__->has_many(pokemon => 'Vee::Schema::Pokemon', 'evid'); 
     
    3539__PACKAGE__->belongs_to(base_pokemon => 'Vee::Schema::Pokemon', 'base'); 
    3640 
     41=head1 SEE ALSO 
     42 
     43L<Vee::Schema>, L<DBIx::Class> 
     44 
     45=head1 AUTHOR 
     46 
     47Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     48 
     49See the included F<AUTHORS> file for a full list of contributers. 
     50 
     51=head1 LICENSE 
     52 
     53See the included F<LICENSE> file. 
     54 
     55=cut 
     56 
    37571; 
  • veekun/trunk/lib/Vee/Schema/FlavorText.pm

    r31 r350  
    33use strict; 
    44use warnings; 
    5  
    65use base 'DBIx::Class'; 
    76 
    8 __PACKAGE__->load_components("PK::Auto", "Core"); 
    9 __PACKAGE__->table("flavortext"); 
    10 __PACKAGE__->add_columns("pokeid", "generation", "text"); 
     7=head1 NAME 
     8 
     9Vee::Schema::FlavorText - DBIC class for the C<flavortext> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('flavortext'); 
     15__PACKAGE__->add_columns(qw/ pokeid generation text /); 
    1116 
    1217__PACKAGE__->belongs_to(pokemon => 'Vee::Schema::Pokemon', 'pokeid'); 
    1318 
     19=head1 SEE ALSO 
     20 
     21L<Vee::Schema>, L<DBIx::Class> 
     22 
     23=head1 AUTHOR 
     24 
     25Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     26 
     27See the included F<AUTHORS> file for a full list of contributers. 
     28 
     29=head1 LICENSE 
     30 
     31See the included F<LICENSE> file. 
     32 
     33=cut 
     34 
    14351; 
  • veekun/trunk/lib/Vee/Schema/Forums.pm

    r31 r350  
    11package Vee::Schema::Forums; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("forums"); 
    12 __PACKAGE__->add_columns("id", "name", "lastpostid", "threadct", "postct", "flags", "accessibility", "blurb"); 
    13 __PACKAGE__->set_primary_key("id"); 
    14 __PACKAGE__->add_unique_constraint(["id"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::Forums - DBIC class for the C<forums> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('forums'); 
     15__PACKAGE__->add_columns(qw/ 
     16    id name lastpostid threadct postct flags accessibility blurb 
     17/); 
     18__PACKAGE__->set_primary_key('id'); 
    1519 
    1620__PACKAGE__->has_many(threads => 'Vee::Schema::Threads', 'forumid'); 
    1721__PACKAGE__->might_have(lastpost => 'Vee::Schema::Posts', { 'foreign.id' => 'self.lastpostid' }); 
    1822 
     23=head1 SEE ALSO 
     24 
     25L<Vee::Schema>, L<DBIx::Class> 
     26 
     27=head1 AUTHOR 
     28 
     29Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     30 
     31See the included F<AUTHORS> file for a full list of contributers. 
     32 
     33=head1 LICENSE 
     34 
     35See the included F<LICENSE> file. 
     36 
     37=cut 
     38 
    19391; 
    20  
  • veekun/trunk/lib/Vee/Schema/Gallery.pm

    r31 r350  
    11package Vee::Schema::Gallery; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("gallery"); 
    12 __PACKAGE__->add_columns( 
    13   "id", 
    14   "creatorid", 
    15   "filename", 
    16   "uploaderid", 
    17   "approverid", 
    18   "time", 
    19   "hash", 
    20   "title", 
    21   "description", 
    22   "height", 
    23   "width", 
    24   "seriesid", 
    25   "position", 
    26   "type", 
    27 ); 
    28 __PACKAGE__->set_primary_key("id"); 
    29 __PACKAGE__->add_unique_constraint("filename", ["filename"]); 
    30 __PACKAGE__->add_unique_constraint(["filename"], undef); 
    31 __PACKAGE__->add_unique_constraint(["id"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::Gallery - DBIC class for the C<gallery> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('gallery'); 
     15__PACKAGE__->add_columns(qw/ 
     16    id 
     17    creatorid 
     18    filename 
     19    uploaderid 
     20    approverid 
     21    time 
     22    hash 
     23    title 
     24    description 
     25    height 
     26    width 
     27    seriesid 
     28    position 
     29    type 
     30/); 
     31__PACKAGE__->set_primary_key('id'); 
     32__PACKAGE__->add_unique_constraint(filename => ['filename']); 
     33 
     34=head1 SEE ALSO 
     35 
     36L<Vee::Schema>, L<DBIx::Class> 
     37 
     38=head1 AUTHOR 
     39 
     40Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     41 
     42See the included F<AUTHORS> file for a full list of contributers. 
     43 
     44=head1 LICENSE 
     45 
     46See the included F<LICENSE> file. 
     47 
     48=cut 
    3249 
    33501; 
    34  
  • veekun/trunk/lib/Vee/Schema/GalleryKeywords.pm

    r31 r350  
    11package Vee::Schema::GalleryKeywords; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("gallerykeywords"); 
    12 __PACKAGE__->add_columns("id", "keyword", "category", "description"); 
    13 __PACKAGE__->set_primary_key("id"); 
     7=head1 NAME 
     8 
     9Vee::Schema::GalleryKeywords - DBIC class for the C<gallerykeywords> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('gallerykeywords'); 
     15__PACKAGE__->add_columns(qw/ id keyword category description /); 
     16__PACKAGE__->set_primary_key('id'); 
    1417__PACKAGE__->add_unique_constraint("keyword", ["keyword"]); 
    15 __PACKAGE__->add_unique_constraint(["keyword"], undef); 
    16 __PACKAGE__->add_unique_constraint(["id"], undef); 
     18 
     19=head1 SEE ALSO 
     20 
     21L<Vee::Schema>, L<DBIx::Class> 
     22 
     23=head1 AUTHOR 
     24 
     25Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     26 
     27See the included F<AUTHORS> file for a full list of contributers. 
     28 
     29=head1 LICENSE 
     30 
     31See the included F<LICENSE> file. 
     32 
     33=cut 
    1734 
    18351; 
    19  
  • veekun/trunk/lib/Vee/Schema/GroupPermissions.pm

    r31 r350  
    11package Vee::Schema::GroupPermissions; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("grouppermissions"); 
    12 __PACKAGE__->add_columns("groupid", "permission", "scope", "polarity"); 
    13 __PACKAGE__->set_primary_key("groupid", "permission", "scope"); 
    14 __PACKAGE__->add_unique_constraint(["groupid", "permission", "scope"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::GroupPermissions - DBIC class for the C<grouppermissions> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('grouppermissions'); 
     15__PACKAGE__->add_columns(qw/ groupid permission scope polarity /); 
     16__PACKAGE__->set_primary_key(qw/ groupid permission scope /); 
    1517 
    16181; 
  • veekun/trunk/lib/Vee/Schema/Groups.pm

    r31 r350  
    11package Vee::Schema::Groups; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("groups"); 
    12 __PACKAGE__->add_columns("id", "icon", "name"); 
    13 __PACKAGE__->set_primary_key("id"); 
    14 __PACKAGE__->add_unique_constraint(["id"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::Groups - DBIC class for the C<groups> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('groups'); 
     15__PACKAGE__->add_columns(qw/ id icon name /); 
     16__PACKAGE__->set_primary_key('id'); 
    1517 
    1618__PACKAGE__->has_many(user_groups => 'Vee::Schema::UserGroups', 'groupid'); 
  • veekun/trunk/lib/Vee/Schema/ItemKeywords.pm

    r31 r350  
    11package Vee::Schema::ItemKeywords; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("itemkeywords"); 
    12 __PACKAGE__->add_columns("itemid", "keywordid"); 
    13 __PACKAGE__->set_primary_key("itemid", "keywordid"); 
    14 __PACKAGE__->add_unique_constraint(["itemid", "keywordid"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::ItemKeywords - DBIC class for the C<itemkeywords> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('itemkeywords'); 
     15__PACKAGE__->add_columns(qw/ itemid keywordid /); 
     16__PACKAGE__->set_primary_key(qw/ itemid keywordid /); 
     17 
     18=head1 SEE ALSO 
     19 
     20L<Vee::Schema>, L<DBIx::Class> 
     21 
     22=head1 AUTHOR 
     23 
     24Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     25 
     26See the included F<AUTHORS> file for a full list of contributers. 
     27 
     28=head1 LICENSE 
     29 
     30See the included F<LICENSE> file. 
     31 
     32=cut 
    1533 
    16341; 
    17  
  • veekun/trunk/lib/Vee/Schema/Items.pm

    r315 r350  
    11package Vee::Schema::Items; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("items"); 
     7=head1 NAME 
     8 
     9Vee::Schema::Items - DBIC class for the C<items> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('items'); 
    1215__PACKAGE__->add_columns(qw/ id game_id berry_id name category cost col5 hp_plus_maybe fling_power fling_effect natural_gift_power natural_gift_type col12 col13 col14 col15 col16 col17 col18 col19 col20 col21 col22 col23 effort_hp effort_at effort_de effort_sp effort_sa effort_sd hp_restored pp_restored happiness1 happiness2 happiness3 is_underground dpblurb description /); 
    13 __PACKAGE__->set_primary_key("id"); 
    14 __PACKAGE__->add_unique_constraint(["id"], undef); 
     16__PACKAGE__->set_primary_key('id'); 
    1517 
    1618__PACKAGE__->has_many(pokemon_items => 'Vee::Schema::PokemonItems', 'item_id', { join_type => 'left' }); 
     
    1820 
    1921__PACKAGE__->might_have(berry => 'Vee::Schema::Berries', { 'foreign.id' => 'self.berry_id' }); 
     22 
     23=head1 METHODS 
     24 
     25=head2 display_name 
     26 
     27Returns this item's name, suitable for display.  This method actually just 
     28replaces 'Poke' with 'Pok&eacute;', as the database is not currently designed 
     29for Unicode. 
     30 
     31=cut 
    2032 
    2133sub display_name { 
     
    2638    return $name; 
    2739} 
     40 
     41=head2 display_name 
     42 
     43Returns the filename (sans extension) for this item's sprite. 
     44 
     45=cut 
    2846 
    2947sub sprite_name { 
     
    3957} 
    4058 
     59=head2 fling_description 
     60 
     61Returns the effect this item will cause when Fling is used with it. 
     62 
     63=cut 
     64 
    4165sub fling_description { 
    4266    my ($self) = @_; 
     
    5175} 
    5276 
     77=head1 SEE ALSO 
     78 
     79L<Vee::Schema>, L<DBIx::Class> 
     80 
     81=head1 AUTHOR 
     82 
     83Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     84 
     85See the included F<AUTHORS> file for a full list of contributers. 
     86 
     87=head1 LICENSE 
     88 
     89See the included F<LICENSE> file. 
     90 
     91=cut 
     92 
    53931; 
    54  
  • veekun/trunk/lib/Vee/Schema/LocationEncounters.pm

    r109 r350  
    33use strict; 
    44use warnings; 
    5  
    65use base 'DBIx::Class'; 
    76 
    8 __PACKAGE__->load_components(qw/ PK::Auto Core /); 
     7=head1 NAME 
     8 
     9Vee::Schema::LocationEncounters - DBIC class for the C<location_encounters> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
    914__PACKAGE__->table('location_encounters'); 
    1015__PACKAGE__->add_columns(qw/ location_id rarity version section pokemon_id method min_level max_level /); 
    11 __PACKAGE__->set_primary_key('location_id', 'rarity'); 
    12 __PACKAGE__->add_unique_constraint(['location_id', 'rarity'], undef); 
     16__PACKAGE__->set_primary_key(qw/ location_id rarity /); 
    1317 
    1418__PACKAGE__->belongs_to(pokemon => 'Vee::Schema::Pokemon', 'pokemon_id'); 
    1519__PACKAGE__->belongs_to(location => 'Vee::Schema::Locations', 'location_id'); 
    1620 
    17 # what can I say?  I'm lazy 
     21=head1 METHODS 
     22 
     23=head2 level 
     24 
     25Returns this encounter's level range formatted in a human-readable way, i.e. 
     26"A - B", or just "A" if the range is actually just one level. 
     27 
     28=cut 
     29 
    1830sub level { 
    1931    my ($self) = @_; 
     
    3143} 
    3244 
     45=head1 SEE ALSO 
     46 
     47L<Vee::Schema>, L<DBIx::Class> 
     48 
     49=head1 AUTHOR 
     50 
     51Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     52 
     53See the included F<AUTHORS> file for a full list of contributers. 
     54 
     55=head1 LICENSE 
     56 
     57See the included F<LICENSE> file. 
     58 
     59=cut 
     60 
    33611; 
  • veekun/trunk/lib/Vee/Schema/Locations.pm

    r62 r350  
    11package Vee::Schema::Locations; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components(qw/ PK::Auto Core /); 
     7=head1 NAME 
     8 
     9Vee::Schema::Locations - DBIC class for the C<locations> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
    1114__PACKAGE__->table('locations'); 
    1215__PACKAGE__->add_columns(qw/ id internal_id generation name coordinates /); 
    1316__PACKAGE__->set_primary_key('id'); 
    14 __PACKAGE__->add_unique_constraint(['id'], undef); 
    1517 
    1618__PACKAGE__->has_many(encounters => 'Vee::Schema::LocationEncounters', 'location_id'); 
    1719 
     20=head1 SEE ALSO 
     21 
     22L<Vee::Schema>, L<DBIx::Class> 
     23 
     24=head1 AUTHOR 
     25 
     26Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     27 
     28See the included F<AUTHORS> file for a full list of contributers. 
     29 
     30=head1 LICENSE 
     31 
     32See the included F<LICENSE> file. 
     33 
     34=cut 
     35 
    18361; 
  • veekun/trunk/lib/Vee/Schema/Machines.pm

    r31 r350  
    11package Vee::Schema::Machines; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("machines"); 
    12 __PACKAGE__->add_columns("id", "generation", "cost", "moveid", "location"); 
    13 __PACKAGE__->set_primary_key("id", "generation"); 
    14 __PACKAGE__->add_unique_constraint(["id", "generation"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::Machines - DBIC class for the C<machines> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('machines'); 
     15__PACKAGE__->add_columns(qw/ id generation cost moveid location /); 
     16__PACKAGE__->set_primary_key(qw/ id generation /); 
     17 
     18=head1 SEE ALSO 
     19 
     20L<Vee::Schema>, L<DBIx::Class> 
     21 
     22=head1 AUTHOR 
     23 
     24Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     25 
     26See the included F<AUTHORS> file for a full list of contributers. 
     27 
     28=head1 LICENSE 
     29 
     30See the included F<LICENSE> file. 
     31 
     32=cut 
    1533 
    16341; 
    17  
  • veekun/trunk/lib/Vee/Schema/Messages.pm

    r31 r350  
    33use strict; 
    44use warnings; 
    5  
    65use base 'DBIx::Class'; 
    76 
    8 __PACKAGE__->load_components("PK::Auto", "Core"); 
    9 __PACKAGE__->table("messages"); 
    10 __PACKAGE__->add_columns("id", "from_user_id", "to_user_id", "time", "subject", "message"); 
    11 __PACKAGE__->set_primary_key("id"); 
    12 __PACKAGE__->add_unique_constraint(["id"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::Messages - DBIC class for the C<messages> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('messages'); 
     15__PACKAGE__->add_columns(qw/ id from_user_id to_user_id time subject message /); 
     16__PACKAGE__->set_primary_key('id'); 
    1317 
    1418__PACKAGE__->belongs_to(recipient => 'Vee::Schema::Users', 'to_user_id'); 
    1519__PACKAGE__->might_have(sender => 'Vee::Schema::Users', { 'foreign.id' => 'self.from_user_id' }); 
    1620 
     21=head1 SEE ALSO 
     22 
     23L<Vee::Schema>, L<DBIx::Class> 
     24 
     25=head1 AUTHOR 
     26 
     27Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     28 
     29See the included F<AUTHORS> file for a full list of contributers. 
     30 
     31=head1 LICENSE 
     32 
     33See the included F<LICENSE> file. 
     34 
     35=cut 
     36 
    17371; 
    18  
  • veekun/trunk/lib/Vee/Schema/MoveEffects.pm

    r145 r350  
    11package Vee::Schema::MoveEffects; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("move_effects"); 
    12 __PACKAGE__->add_columns( 
    13   "id", 
    14   "priority", 
    15   "blurb", 
    16   "description", 
    17 ); 
    18 __PACKAGE__->set_primary_key("id"); 
    19 __PACKAGE__->add_unique_constraint(["id"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::MoveEffects - DBIC class for the C<move_effects> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('move_effects'); 
     15__PACKAGE__->add_columns(qw/ id priority blurb description /); 
     16__PACKAGE__->set_primary_key('id'); 
    2017 
    2118__PACKAGE__->has_many(moves => 'Vee::Schema::Moves', 'move_effect_id'); 
    2219 
     20=head1 SEE ALSO 
     21 
     22L<Vee::Schema>, L<DBIx::Class> 
     23 
     24=head1 AUTHOR 
     25 
     26Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     27 
     28See the included F<AUTHORS> file for a full list of contributers. 
     29 
     30=head1 LICENSE 
     31 
     32See the included F<LICENSE> file. 
     33 
     34=cut 
     35 
    23361; 
  • veekun/trunk/lib/Vee/Schema/Moves.pm

    r148 r350  
    11package Vee::Schema::Moves; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("moves"); 
    12 __PACKAGE__->add_columns( 
    13   "id", 
    14   "name", 
    15   "name_jp", 
    16   "name_romaji", 
    17   "type", 
    18   "power", 
    19   "pp", 
    20   "acc", 
    21   "target", 
    22   "class", 
    23   "flags", 
    24   "combos", 
    25   "effect_chance", 
    26   "kind", 
    27   "status", 
    28   "move_effect_id", 
    29   "gameblurb", 
    30   "dpblurb", 
    31   "contype", 
    32   "coneffect", 
    33   "notes", 
    34 ); 
    35 __PACKAGE__->set_primary_key("id"); 
    36 __PACKAGE__->add_unique_constraint(["id"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::Moves - DBIC class for the C<moves> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('moves'); 
     15__PACKAGE__->add_columns(qw/ 
     16    id 
     17    name 
     18    name_jp 
     19    name_romaji 
     20    type 
     21    power 
     22    pp 
     23    acc 
     24    target 
     25    class 
     26    flags 
     27    combos 
     28    effect_chance 
     29    kind 
     30    status 
     31    move_effect_id 
     32    gameblurb 
     33    dpblurb 
     34    contype 
     35    coneffect 
     36    notes 
     37/); 
     38__PACKAGE__->set_primary_key('id'); 
    3739 
    3840__PACKAGE__->belongs_to(contest => 'Vee::Schema::ContestMoves', 'coneffect'); 
     
    4042__PACKAGE__->has_many(pokemoves => 'Vee::Schema::PokeMoves', 'moveid'); 
    4143 
    42 # Laziness to make %MoveData easier to use 
     44=head1 METHODS 
     45 
     46=head2 priority 
     47 
     48Returns the priority of the given move.  Only exists for consistency, as this 
     49is the only data commonly accessed via C<%MoveData> that is actually a column 
     50of C<move_effects>. 
     51 
     52=cut 
     53 
    4354sub priority { 
    4455    my ($self) = @_; 
     
    4657} 
    4758 
    48 # Shortcut to get a preformatted move description 
     59=head2 description 
     60 
     61Returns the full description for this move.  Applies C<_format_description> 
     62effects, and converts tab-delimited tables to HTML. 
     63 
     64=cut 
     65 
    4966sub description { 
    5067    my ($self) = @_; 
     
    7188} 
    7289 
    73 # Shortcut to get a preformatted short move description, defaulting to the long 
    74 # one 
     90=head2 blurb 
     91 
     92Returns a short blurb for this move, suitable for putting in a move table. 
     93Applies C<_format_description> effects. 
     94 
     95If this move's move effect has no blurb, the full description will be used 
     96instead.  This should no longer happen, but was necessary for some degree of 
     97completion when the blurbs were still being written. 
     98 
     99=cut 
     100 
    75101sub blurb { 
    76102    my ($self) = @_; 
     
    81107} 
    82108 
    83 # PRIVATE 
     109=head2 _format_description($text) 
    84110 
    85 # Clean up a move description; currently just inserts effect chance. 
     111Inserts this move's effect chance and priority into the provided string, if 
     112applicable.  Used by C<description> and C<blurb>. 
     113 
     114=cut 
     115 
    86116sub _format_description { 
    87117    my ($self, $text) = @_; 
     
    100130} 
    101131 
     132=head1 SEE ALSO 
     133 
     134L<Vee::Schema>, L<DBIx::Class> 
     135 
     136=head1 AUTHOR 
     137 
     138Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     139 
     140See the included F<AUTHORS> file for a full list of contributers. 
     141 
     142=head1 LICENSE 
     143 
     144See the included F<LICENSE> file. 
     145 
     146=cut 
     147 
    1021481; 
  • veekun/trunk/lib/Vee/Schema/Permissions.pm

    r31 r350  
    11package Vee::Schema::Permissions; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("permissions"); 
    12 __PACKAGE__->add_columns("groupid", "permission", "scope", "polarity"); 
    13 __PACKAGE__->set_primary_key("groupid", "permission", "scope", "polarity"); 
    14 __PACKAGE__->add_unique_constraint(["groupid", "permission", "scope", "polarity"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::Permissions - DBIC class for the C<permissions> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('permissions'); 
     15__PACKAGE__->add_columns(qw/ groupid permission scope polarity /); 
     16__PACKAGE__->set_primary_key(qw/ groupid permission scope polarity /); 
     17 
     18=head1 SEE ALSO 
     19 
     20L<Vee::Schema>, L<DBIx::Class> 
     21 
     22=head1 AUTHOR 
     23 
     24Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     25 
     26See the included F<AUTHORS> file for a full list of contributers. 
     27 
     28=head1 LICENSE 
     29 
     30See the included F<LICENSE> file. 
     31 
     32=cut 
    1533 
    16341; 
    17  
  • veekun/trunk/lib/Vee/Schema/PokeMoves.pm

    r329 r350  
    11package Vee::Schema::PokeMoves; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("pokemoves"); 
    12 __PACKAGE__->add_columns("pokeid", "moveid", "level", "version", "method"); 
     7=head1 NAME 
     8 
     9Vee::Schema::PokeMoves - DBIC class for the C<pokemoves> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('pokemoves'); 
     15__PACKAGE__->add_columns(qw/ pokeid moveid level version method /); 
    1316 
    1417__PACKAGE__->set_primary_key(qw/ pokeid moveid level version method /); 
    15 __PACKAGE__->add_unique_constraint([qw[ pokeid moveid level version method ]], undef); 
    1618 
    1719__PACKAGE__->belongs_to(pokemon => 'Vee::Schema::Pokemon', 'pokeid'); 
    1820__PACKAGE__->belongs_to(move => 'Vee::Schema::Moves', 'moveid'); 
    1921 
     22=head1 SEE ALSO 
     23 
     24L<Vee::Schema>, L<DBIx::Class> 
     25 
     26=head1 AUTHOR 
     27 
     28Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     29 
     30See the included F<AUTHORS> file for a full list of contributers. 
     31 
     32=head1 LICENSE 
     33 
     34See the included F<LICENSE> file. 
     35 
     36=cut 
     37 
    20381; 
  • veekun/trunk/lib/Vee/Schema/Pokemon.pm

    r329 r350  
    11package Vee::Schema::Pokemon; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
     
    75use base 'DBIx::Class'; 
    86 
    9 __PACKAGE__->load_components("PK::Auto", "Core"); 
    10 __PACKAGE__->table("pokemon"); 
    11 __PACKAGE__->add_columns( 
    12   "id", 
    13   "id_johto", 
    14   "id_hoenn", 
    15   "id_sinnoh", 
    16   "name", 
    17   "alt_form", 
    18   "name_jp", 
    19   "name_romaji", 
    20   "evid", 
    21   "evparent", 
    22   "evmethod", 
    23   "evparam", 
    24   "height", 
    25   "weight", 
    26   "type1", 
    27   "type2", 
    28   "species", 
    29   "color", 
    30   "habitat", 
    31   "stat_at", 
    32   "stat_de", 
    33   "stat_sa", 
    34   "stat_sd", 
    35   "stat_sp", 
    36   "stat_hp", 
    37   "effort", 
    38   "oldgs", 
    39   "caprate", 
    40   "baseexp", 
    41   "gender", 
    42   "happiness", 
    43   "root", 
    44   "eventred", 
    45   "eventblue", 
    46   "notes", 
    47   "flags", 
    48   "real_id", 
    49 ); 
    50 __PACKAGE__->set_primary_key("id"); 
    51 __PACKAGE__->add_unique_constraint(["id"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::Pokemon - DBIC class for the C<pokemon> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('pokemon'); 
     15__PACKAGE__->add_columns(qw/ 
     16    id 
     17    id_johto 
     18    id_hoenn 
     19    id_sinnoh 
     20 
     21    name 
     22    alt_form 
     23    name_jp 
     24    name_romaji 
     25 
     26    evid 
     27    evparent 
     28    evmethod 
     29    evparam 
     30 
     31    height 
     32    weight 
     33    type1 
     34    type2 
     35    species 
     36    color 
     37    habitat 
     38 
     39    stat_at 
     40    stat_de 
     41    stat_sa 
     42    stat_sd 
     43    stat_sp 
     44    stat_hp 
     45 
     46    effort 
     47    oldgs 
     48    caprate 
     49    baseexp 
     50    gender 
     51    happiness 
     52    root 
     53    eventred 
     54    eventblue 
     55    notes 
     56    flags 
     57    real_id 
     58/); 
     59__PACKAGE__->set_primary_key('id'); 
    5260 
    5361__PACKAGE__->belongs_to(evchain => 'Vee::Schema::EvChains', 'evid'); 
     
    6674__PACKAGE__->has_many(descendants => 'Vee::Schema::Pokemon', 'evparent'); 
    6775 
    68 # I am really tired of how many different ways breeding groups are used, so 
    69 # here are some subs to clean it up. 
    70 # TODO: pod, for this and every other schema class.  restyle them all really, or look into autoload 
     76=head1 METHODS 
    7177 
    72 # true if the Pokemon can breed at all (i.e. no F groups) 
     78=head2 can_breed 
     79 
     80Returns true if this Pokemon can breed, false otherwise. 
     81 
     82=cut 
     83 
    7384sub can_breed { 
    7485    my ($self) = @_; 
     
    7788} 
    7889 
    79 # return just a flat list of breeding groups; TODO: rename this 'breeds' and rename the above join 
     90=head2 can_breed 
     91 
     92Returns a list of egg group codes. 
     93 
     94=cut 
     95 
     96# TODO: rename this 'breeds' and rename the above join 
    8097sub breeding_groups { 
    8198    my ($self) = @_; 
     
    83100} 
    84101 
    85 # recreate original breeding code; just hex listed in ascending order 
     102=head2 can_breed 
     103 
     104Returns the in-game breeding code for this Pokemon. 
     105 
     106=cut 
     107 
    86108sub breeding_code { 
    87109    my ($self) = @_; 
     
    92114} 
    93115 
    94 # returns true iff this Pokemon has a breeding group in common with the given other Pokemon 
     116=head2 can_breed_with($pokemon) 
     117 
     118Returns true if this Pokemon can breed with the given Pokemon, false otherwise. 
     119 
     120=cut 
     121 
    95122sub can_breed_with { 
    96123    my ($poke1, $poke2) = @_; 
    97124    my %breeds; 
    98125 
    99     # breeds cannot appear twice due to keying, so this is guaranteed to work 
     126    # Egg groups cannot appear twice due to keying, so this is guaranteed to 
     127    # work 
    100128    $breeds{$_}++ for $poke1->breeding_groups, $poke2->breeding_groups; 
    101129    delete $breeds{15}; 
    102130 
    103     # compatible if at least one breed appears twice 
     131    # Compatible if at least one egg group appears twice 
    104132    return grep { $_ > 1 } values %breeds; 
    105133} 
    106134 
     135=head1 SEE ALSO 
     136 
     137L<Vee::Schema>, L<DBIx::Class> 
     138 
     139=head1 AUTHOR 
     140 
     141Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     142 
     143See the included F<AUTHORS> file for a full list of contributers. 
     144 
     145=head1 LICENSE 
     146 
     147See the included F<LICENSE> file. 
     148 
     149=cut 
     150 
    1071511; 
  • veekun/trunk/lib/Vee/Schema/PokemonAbilities.pm

    r306 r350  
    11package Vee::Schema::PokemonAbilities; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("pokemon_abilities"); 
     7=head1 NAME 
     8 
     9Vee::Schema::PokemonAbilities - DBIC class for the C<pokemon_abilities> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('pokemon_abilities'); 
    1215__PACKAGE__->add_columns(qw/ pokeid abilityid slot /); 
    13 __PACKAGE__->set_primary_key('pokeid', 'abilityid'); 
    14 __PACKAGE__->add_unique_constraint(['pokeid', 'abilityid'], undef); 
     16__PACKAGE__->set_primary_key(qw/ pokeid abilityid /); 
    1517 
    1618__PACKAGE__->belongs_to(pokemon => 'Vee::Schema::Pokemon', 'pokeid'); 
    1719__PACKAGE__->belongs_to(ability => 'Vee::Schema::Abilities', 'abilityid'); 
    1820 
     21=head1 SEE ALSO 
     22 
     23L<Vee::Schema>, L<DBIx::Class> 
     24 
     25=head1 AUTHOR 
     26 
     27Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     28 
     29See the included F<AUTHORS> file for a full list of contributers. 
     30 
     31=head1 LICENSE 
     32 
     33See the included F<LICENSE> file. 
     34 
     35=cut 
     36 
    19371; 
    20  
  • veekun/trunk/lib/Vee/Schema/PokemonBreeds.pm

    r48 r350  
    11package Vee::Schema::PokemonBreeds; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("pokemon_breeds"); 
     7=head1 NAME 
     8 
     9Vee::Schema::PokemonBreeds - DBIC class for the C<pokemon_breeds> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('pokemon_breeds'); 
    1215__PACKAGE__->add_columns(qw/ pokeid breed /); 
    13 __PACKAGE__->set_primary_key('pokeid', 'breed'); 
    14 __PACKAGE__->add_unique_constraint(['pokeid', 'breed'], undef); 
     16__PACKAGE__->set_primary_key(qw/ pokeid breed /); 
    1517 
    1618__PACKAGE__->belongs_to(pokemon => 'Vee::Schema::Pokemon', 'pokeid'); 
    1719 
     20=head1 SEE ALSO 
     21 
     22L<Vee::Schema>, L<DBIx::Class> 
     23 
     24=head1 AUTHOR 
     25 
     26Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     27 
     28See the included F<AUTHORS> file for a full list of contributers. 
     29 
     30=head1 LICENSE 
     31 
     32See the included F<LICENSE> file. 
     33 
     34=cut 
     35 
    18361; 
    19  
  • veekun/trunk/lib/Vee/Schema/PokemonItems.pm

    r222 r350  
    11package Vee::Schema::PokemonItems; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("pokemon_items"); 
     7=head1 NAME 
     8 
     9Vee::Schema::PokemonItems - DBIC class for the C<pokemon_items> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('pokemon_items'); 
    1215__PACKAGE__->add_columns(qw/ pokemon_id item_id rarity /); 
    13 __PACKAGE__->set_primary_key('pokemon_id', 'item_id'); 
    14 __PACKAGE__->add_unique_constraint(['pokemon_id', 'item_id'], undef); 
     16__PACKAGE__->set_primary_key(qw/ pokemon_id item_id /); 
    1517 
    1618__PACKAGE__->belongs_to(pokemon => 'Vee::Schema::Pokemon', 'pokemon_id', { join_type => 'LEFT' }); 
    1719__PACKAGE__->belongs_to(item => 'Vee::Schema::Items', 'item_id', { join_type => 'LEFT' }); 
    1820 
     21=head1 SEE ALSO 
     22 
     23L<Vee::Schema>, L<DBIx::Class> 
     24 
     25=head1 AUTHOR 
     26 
     27Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     28 
     29See the included F<AUTHORS> file for a full list of contributers. 
     30 
     31=head1 LICENSE 
     32 
     33See the included F<LICENSE> file. 
     34 
     35=cut 
     36 
    19371; 
    20  
  • veekun/trunk/lib/Vee/Schema/Posts.pm

    r31 r350  
    11package Vee::Schema::Posts; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("posts"); 
    12 __PACKAGE__->add_columns("id", "threadid", "userid", "flags", "time", "format", "message", "lasteditid"); 
    13 __PACKAGE__->set_primary_key("id"); 
    14 __PACKAGE__->add_unique_constraint(["id"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::Posts - DBIC class for the C<posts> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('posts'); 
     15__PACKAGE__->add_columns(qw/ id threadid userid flags time format message lasteditid /); 
     16__PACKAGE__->set_primary_key('id'); 
    1517 
    1618__PACKAGE__->belongs_to(thread => 'Vee::Schema::Threads', 'threadid'); 
     
    1921__PACKAGE__->might_have(lastedit => 'Vee::Schema::Edits', { 'foreign.id' => 'self.lasteditid' }); 
    2022 
     23=head1 SEE ALSO 
     24 
     25L<Vee::Schema>, L<DBIx::Class> 
     26 
     27=head1 AUTHOR 
     28 
     29Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     30 
     31See the included F<AUTHORS> file for a full list of contributers. 
     32 
     33=head1 LICENSE 
     34 
     35See the included F<LICENSE> file. 
     36 
     37=cut 
     38 
    21391; 
    22  
  • veekun/trunk/lib/Vee/Schema/Sessions.pm

    r31 r350  
    11package Vee::Schema::Sessions; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("sessions"); 
    12 __PACKAGE__->add_columns("id", "userid", "expires", "data"); 
    13 __PACKAGE__->set_primary_key("id"); 
    14 __PACKAGE__->add_unique_constraint(["id"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::Sessions - DBIC class for the C<sessions> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('sessions'); 
     15__PACKAGE__->add_columns(qw/ id userid expires data /); 
     16__PACKAGE__->set_primary_key('id'); 
     17 
     18=head1 SEE ALSO 
     19 
     20L<Vee::Schema>, L<DBIx::Class> 
     21 
     22=head1 AUTHOR 
     23 
     24Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     25 
     26See the included F<AUTHORS> file for a full list of contributers. 
     27 
     28=head1 LICENSE 
     29 
     30See the included F<LICENSE> file. 
     31 
     32=cut 
    1533 
    16341; 
    17  
  • veekun/trunk/lib/Vee/Schema/Shoutbox.pm

    r31 r350  
    11package Vee::Schema::Shoutbox; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("shoutbox"); 
    12 __PACKAGE__->add_columns("id", "name", "userid", "ip", "time", "message"); 
    13 __PACKAGE__->set_primary_key("id"); 
    14 __PACKAGE__->add_unique_constraint(["id"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::Shoutbox - DBIC class for the C<shoutbox> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('shoutbox'); 
     15__PACKAGE__->add_columns(qw/ id name userid ip time message /); 
     16__PACKAGE__->set_primary_key('id'); 
    1517 
    1618__PACKAGE__->might_have(user => 'Vee::Schema::Users', { 'foreign.id' => 'self.userid' }); 
    1719 
     20=head1 SEE ALSO 
     21 
     22L<Vee::Schema>, L<DBIx::Class> 
     23 
     24=head1 AUTHOR 
     25 
     26Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     27 
     28See the included F<AUTHORS> file for a full list of contributers. 
     29 
     30=head1 LICENSE 
     31 
     32See the included F<LICENSE> file. 
     33 
     34=cut 
     35 
    18361; 
    19  
  • veekun/trunk/lib/Vee/Schema/ThreadViews.pm

    r287 r350  
    33use strict; 
    44use warnings; 
    5  
    65use base 'DBIx::Class'; 
    76 
    8 __PACKAGE__->load_components("PK::Auto", "Core"); 
    9 __PACKAGE__->table("thread_views"); 
     7=head1 NAME 
     8 
     9Vee::Schema::ThreadViews - DBIC class for the C<thread_views> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('thread_views'); 
    1015__PACKAGE__->add_columns(qw/ thread_id user_id last_viewed /); 
    11 __PACKAGE__->set_primary_key('thread_id', 'user_id'); 
    12 __PACKAGE__->add_unique_constraint(['thread_id', 'user_id'], undef); 
     16__PACKAGE__->set_primary_key(qw/ thread_id user_id /); 
    1317 
    1418__PACKAGE__->belongs_to(thread => 'Vee::Schema::Threads', 'thread_id', { join_type => 'LEFT' }); 
     
    1620# TODO: thread and user need to join to me! 
    1721 
     22=head1 SEE ALSO 
     23 
     24L<Vee::Schema>, L<DBIx::Class> 
     25 
     26=head1 AUTHOR 
     27 
     28Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     29 
     30See the included F<AUTHORS> file for a full list of contributers. 
     31 
     32=head1 LICENSE 
     33 
     34See the included F<LICENSE> file. 
     35 
     36=cut 
     37 
    18381; 
    19  
  • veekun/trunk/lib/Vee/Schema/Threads.pm

    r298 r350  
    11package Vee::Schema::Threads; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "ResultSetManager", "Core"); 
    11 __PACKAGE__->table("threads"); 
    12 __PACKAGE__->add_columns( 
    13   "id", 
    14   "forumid", 
    15   "subject", 
    16   "blurb", 
    17   "firstpostid", 
    18   "lastpostid", 
    19   "lasttime", 
    20   "postct", 
    21   "hitct", 
    22   "flags", 
    23 ); 
    24 __PACKAGE__->set_primary_key("id"); 
    25 __PACKAGE__->add_unique_constraint(["id"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::Threads - DBIC class for the C<threads> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components(qw/ ResultSetManager Core /); 
     14__PACKAGE__->table('threads'); 
     15__PACKAGE__->add_columns(qw/ 
     16  id forumid subject blurb firstpostid lastpostid lasttime postct hitct flags 
     17/); 
     18__PACKAGE__->set_primary_key('id'); 
    2619 
    2720__PACKAGE__->belongs_to(forum => 'Vee::Schema::Forums', 'forumid'); 
     
    3023__PACKAGE__->belongs_to(firstpost => 'Vee::Schema::Posts', 'firstpostid'); 
    3124__PACKAGE__->has_many(thread_views => 'Vee::Schema::ThreadViews', 'thread_id', { join_type => 'LEFT' }); 
     25 
     26=head1 METHODS 
     27 
     28=head2 search_announcements 
     29 
     30Returns a resultset of all the threads flagged as announcements. 
     31 
     32=cut 
    3233 
    3334sub search_announcements : ResultSet { 
     
    3940    ); 
    4041} 
     42 
     43=head2 read_ids($user) 
     44 
     45Returns a list of all thread ids the given user has read. 
     46 
     47=cut 
    4148 
    4249sub read_ids : ResultSet { 
     
    5259} 
    5360 
     61=head1 SEE ALSO 
     62 
     63L<Vee::Schema>, L<DBIx::Class> 
     64 
     65=head1 AUTHOR 
     66 
     67Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     68 
     69See the included F<AUTHORS> file for a full list of contributers. 
     70 
     71=head1 LICENSE 
     72 
     73See the included F<LICENSE> file. 
     74 
     75=cut 
     76 
    54771; 
    55  
  • veekun/trunk/lib/Vee/Schema/Types.pm

    r31 r350  
    11package Vee::Schema::Types; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("types"); 
    12 __PACKAGE__->add_columns( 
    13   "name", 
    14   "abbr", 
    15   "color", 
    16   "rank", 
    17   "id", 
    18   "internalid", 
    19   "new_effects", 
    20   "old_effects", 
    21 ); 
    22 __PACKAGE__->set_primary_key("name"); 
    23 __PACKAGE__->add_unique_constraint(["name"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::Types - DBIC class for the C<types> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('types'); 
     15__PACKAGE__->add_columns(qw/ 
     16    name abbr color rank id internalid new_effects old_effects 
     17/); 
     18__PACKAGE__->set_primary_key('name'); 
     19 
     20=head1 SEE ALSO 
     21 
     22L<Vee::Schema>, L<DBIx::Class> 
     23 
     24=head1 AUTHOR 
     25 
     26Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     27 
     28See the included F<AUTHORS> file for a full list of contributers. 
     29 
     30=head1 LICENSE 
     31 
     32See the included F<LICENSE> file. 
     33 
     34=cut 
    2435 
    25361; 
    26  
  • veekun/trunk/lib/Vee/Schema/UserGroups.pm

    r31 r350  
    11package Vee::Schema::UserGroups; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("usergroups"); 
    12 #CREATE TABLE usergroups (userid INT UNSIGNED NOT NULL, groupid TINYINT UNSIGNED NOT NULL, priority TINYINT UNSIGNED NOT NULL, PRIMARY KEY (userid, groupid, priority), INDEX (userid), INDEX (groupid)); 
    13 __PACKAGE__->add_columns("userid", "groupid", "priority"); 
    14 __PACKAGE__->set_primary_key("userid", "groupid", "priority"); 
    15 __PACKAGE__->add_unique_constraint(["userid", "groupid", "priority"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::UserGroups - DBIC class for the C<usergroups> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('usergroups'); 
     15__PACKAGE__->add_columns(qw/ userid groupid priority /); 
     16__PACKAGE__->set_primary_key(qw/ userid groupid priority /); 
    1617 
    1718__PACKAGE__->belongs_to(user => 'Vee::Schema::Users', 'userid'); 
    18 __PACKAGE__->belongs_to(group_hax => 'Vee::Schema::Groups', 'groupid');  # hack to get around problem with `` quoting  :( 
     19# Temporary hack to get around problem with `` quoting 
     20__PACKAGE__->belongs_to(group_hax => 'Vee::Schema::Groups', 'groupid');   
     21 
     22=head1 SEE ALSO 
     23 
     24L<Vee::Schema>, L<DBIx::Class> 
     25 
     26=head1 AUTHOR 
     27 
     28Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     29 
     30See the included F<AUTHORS> file for a full list of contributers. 
     31 
     32=head1 LICENSE 
     33 
     34See the included F<LICENSE> file. 
     35 
     36=cut 
    1937 
    20381; 
    21  
  • veekun/trunk/lib/Vee/Schema/UserPermissions.pm

    r260 r350  
    11package Vee::Schema::UserPermissions; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("userpermissions"); 
    12 __PACKAGE__->add_columns("userid", "permission", "scope", "polarity"); 
    13 __PACKAGE__->set_primary_key("userid", "permission", "scope"); 
    14 __PACKAGE__->add_unique_constraint(["userid", "permission", "scope"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::UserPermissions - DBIC class for the C<userpermissions> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('userpermissions'); 
     15__PACKAGE__->add_columns(qw/ userid permission scope polarity /); 
     16__PACKAGE__->set_primary_key(qw/ userid permission scope /); 
     17 
     18=head1 SEE ALSO 
     19 
     20L<Vee::Schema>, L<DBIx::Class> 
     21 
     22=head1 AUTHOR 
     23 
     24Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 
     25 
     26See the included F<AUTHORS> file for a full list of contributers. 
     27 
     28=head1 LICENSE 
     29 
     30See the included F<LICENSE> file. 
     31 
     32=cut 
    1533 
    16341; 
  • veekun/trunk/lib/Vee/Schema/Users.pm

    r330 r350  
    11package Vee::Schema::Users; 
    2  
    3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:10 
    42 
    53use strict; 
    64use warnings; 
    7  
    85use base 'DBIx::Class'; 
    96 
    10 __PACKAGE__->load_components("PK::Auto", "Core"); 
    11 __PACKAGE__->table("users"); 
    12 __PACKAGE__->add_columns( 
    13   "id", 
    14   "name", 
    15   "password", 
    16   "joindate", 
    17   "lastactive", 
    18   "thread_view_cutoff", 
    19   "postct", 
    20   "flags", 
    21   "newspic", 
    22   "avatar", 
    23   "contact_aim", 
    24   "contact_icq", 
    25   "contact_msn", 
    26   "contact_yim", 
    27   "contact_lj", 
    28   "contact_homepage", 
    29   "contact_email", 
    30   "pmicon", 
    31   "customtitle", 
    32   "signature", 
    33   "is_dumb", 
    34 ); 
    35 __PACKAGE__->set_primary_key("id"); 
    36 __PACKAGE__->add_unique_constraint("NAME", ["name"]); 
    37 __PACKAGE__->add_unique_constraint(["name"], undef); 
    38 __PACKAGE__->add_unique_constraint(["id"], undef); 
     7=head1 NAME 
     8 
     9Vee::Schema::Users - DBIC class for the C<users> table 
     10 
     11=cut 
     12 
     13__PACKAGE__->load_components('Core'); 
     14__PACKAGE__->table('users'); 
     15__PACKAGE__->add_columns(qw/ 
     16    id 
     17    name 
     18    password 
     19    joindate 
     20    lastactive 
     21    thread_view_cutoff 
     22    postct 
     23    flags 
     24    newspic 
     25    avatar 
     26    contact_aim 
     27    contact_icq 
     28    contact_msn 
     29    contact_yim 
     30    contact_lj 
     31    contact_homepage 
     32    contact_email 
     33    pmicon 
     34    customtitle 
     35    signature 
     36    is_dumb 
     37/); 
     38__PACKAGE__->set_primary_key('id'); 
     39__PACKAGE__->add_unique_constraint(name => ['name']); 
    3940 
    4041__PACKAGE__->has_many(posts => 'Vee::Schema::Posts', 'userid'); 
     
    4445__PACKAGE__->has_many(received_messages => 'Vee::Schema::Messages', 'to_user_id'); 
    4546__PACKAGE__->has_many(thread_views => 'Vee::Schema::ThreadViews', 'thread_id'); 
    46 __PACKAGE__->many_to_many('groups' => 'user_groups', 'group_hax');  # hack to get around problem with `` quoting  :( 
     47# Temporary hack to get around problem with `` quoting 
     48__PACKAGE__->many_to_many('groups' => 'user_groups', 'group_hax'); 
    4749 
    48501;