Mercurial > pub > Impl
comparison lib/IMPL/SQL/Schema/MySQL/CharType.pm @ 407:c6e90e02dd17 ref20150831
renamed Lib->lib
author | cin |
---|---|
date | Fri, 04 Sep 2015 19:40:23 +0300 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
406:f23fcb19d3c1 | 407:c6e90e02dd17 |
---|---|
1 package IMPL::SQL::Schema::MySQL::CharType; | |
2 use strict; | |
3 | |
4 use IMPL::Const qw(:prop); | |
5 use IMPL::declare { | |
6 require => { | |
7 Exception => 'IMPL::Exception', | |
8 ArgException => '-IMPL::InvalidArgumentException' | |
9 }, | |
10 base => [ | |
11 'IMPL::SQL::Schema::Type' => '@_' | |
12 ], | |
13 props => [ | |
14 encoding => PROP_RO | |
15 ] | |
16 }; | |
17 | |
18 my @CHAR_TYPES = qw(VARCHAR CHAR); | |
19 | |
20 sub CTOR { | |
21 my ($this) = @_; | |
22 | |
23 die ArgException->new(name => "The specified name is invalid", $this->name) | |
24 unless grep uc($this->name) eq $_, @CHAR_TYPES; | |
25 } | |
26 | |
27 1; |