MySQL-ORM

 view release on metacpan or  search on metacpan

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

package MySQL::ORM::Generate::Common;

our $VERSION = '0.01';

use Modern::Perl;
use Moose;
use namespace::autoclean;
use Method::Signatures;
use Data::Printer alias => 'pdump';
use MySQL::Util::Lite;
use MySQL::Util::Lite::Column;
use IO::Handle;

##############################################################################
# required attributes
##############################################################################


##############################################################################
# optional attributes
##############################################################################

has use_fq_table_names => (
	is       => 'ro',
	isa      => 'Bool',
	default => 1,
);

##############################################################################
# private attributes
##############################################################################

has _writer => (
	is      => 'rw',
	isa     => 'MySQL::ORM::Generate::Writer',
	lazy    => 1,
	builder => '_build_writer',
);

has _attribute_maker => (
	is      => 'rw',
	isa     => 'MySQL::ORM::Generate::AttributeMaker',
	lazy    => 1,
	builder => '_build_attribute_maker',
);

has _method_maker => (
	is      => 'rw',
	isa     => 'MySQL::ORM::Generate::MethodMaker',
	lazy    => 1,
	builder => '_build_method_maker',
);

##############################################################################
# methods
##############################################################################

method camelize ( Str $str ) {

	my @a = split( /_+/, $str );
	my @b = map { ucfirst $_ } @a;

	return join '', @b;
}



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