Subject: | set_vals method (just like enum_vals) |
=head2 set_vals
my @allowed = $class->set_vals('column_name');
This returns a list of the allowable values for a SET column.
=cut
sub set_vals {
my $class = shift;
my $col = shift or die "Need a column for set_vals";
my $series = $class->_column_info->{$col}->{type};
( my $set ) = $series =~ /set\('(.*?)'\)/ or die "$col is not a SET column";
return map { s/''/'/g; $_ } split( "','", $set );
}