package MySQL::ORM::Generate::MethodMaker; our $VERSION = '0.01'; use Modern::Perl; use Moose; use namespace::autoclean; use Method::Signatures; use Data::Printer alias => 'pdump'; use Text::Trim 'trim'; ############################################################################## # required attributes ############################################################################## ############################################################################## # optional attributes ############################################################################## ############################################################################## # private attributes ############################################################################## ############################################################################## # methods ############################################################################## method make_method (Str :$name, Str :$sig, Str :$body ) { my $text; $text .= "method $name (\n"; if ($sig) { $sig = trim $sig; $text .= " $sig\n"; } $text .= ") {\n"; if ($body) { $body = trim $body; $text .= "$body\n"; } $text .= "}"; return $text; } ############################################################################## # private methods ############################################################################## 1;