X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole%2FModel%2FBase.pm;h=9d673c61858c69061c5e24ab30c3c4be2a0c3849;hb=344d21e842093ff5f863923abe65377999c12c8a;hp=12bb71d24e614cd0e66d87043c2bc6b4108fcbfb;hpb=053b67100478267d34ac98094af3af742098f5fe;p=maypole.git diff --git a/lib/Maypole/Model/Base.pm b/lib/Maypole/Model/Base.pm index 12bb71d..9d673c6 100644 --- a/lib/Maypole/Model/Base.pm +++ b/lib/Maypole/Model/Base.pm @@ -115,7 +115,10 @@ Return a hash mapping column names with human-readable equivalents. =cut -sub column_names { my $class = shift; map { $_ => ucfirst $_ } $class->columns } +sub column_names { my $class = shift; map { + my $col = $_; + $col =~ s/_+(\w)?/ \U\1/g; + $_ => ucfirst $col } $class->columns } =head2 description