comparison Lib/IMPL/SQL/Schema/Constraint/Index.pm @ 165:76515373dac0

Added Class::Template, Rewritten SQL::Schema 'use parent' directive instead of 'use base'
author wizard
date Sat, 23 Apr 2011 23:06:48 +0400
parents 16ada169ca75
children 6148f89bb7bf
comparison
equal deleted inserted replaced
164:eb3e9861a761 165:76515373dac0
1 package IMPL::SQL::Schema::Constraint::Index; 1 package IMPL::SQL::Schema::Constraint::Index;
2 use strict; 2 use strict;
3 use base qw(IMPL::SQL::Schema::Constraint); 3 use parent qw(IMPL::SQL::Schema::Constraint);
4 4
5 __PACKAGE__->PassThroughArgs; 5 __PACKAGE__->PassThroughArgs;
6 6
7 sub CTOR { 7 sub CTOR {
8 my $this = shift; 8 my $this = shift;
9 9
10 my %colnames; 10 my %colnames;
11 not grep { $colnames{$_}++ } @{$this->Columns} or die new Exception('Each column in the index can occur only once'); 11 not grep { $colnames{$_}++ } @{$this->columns} or die new Exception('Each column in the index can occur only once');
12 } 12 }
13 13
14 1; 14 1;