MySQL-ORM

 view release on metacpan or  search on metacpan

lib/MySQL/ORM/Generate/MethodMaker.pm  view on Meta::CPAN

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;



( run in 0.718 second using v1.01-cache-2.11-cpan-39bf76dae61 )