has first_name => ( is => 'rw' );
has last_name => ( is => 'rw' );
+sub BUILDARGS {
+ my $class = shift;
+
+ if ( @_ == 1 && 'ARRAY' eq ref $_[0] ) {
+ return {
+ first_name => $_[0]->[0],
+ last_name => $_[0]->[1],
+ };
+ }
+ else {
+ return $class->SUPER::BUILDARGS(@_);
+ }
+}
+
sub full_name {
my $self = shift;
has last_name => ( is => 'rw' );
+sub BUILDARGS {
+ my $class = shift;
+
+ if ( @_ == 1 && 'ARRAY' eq ref $_[0] ) {
+ return {
+ first_name => $_[0]->[0],
+ last_name => $_[0]->[1],
+ };
+ }
+ else {
+ return $class->SUPER::BUILDARGS(@_);
+ }
+}
+
sub full_name {
my $self = shift;
isa => 'Str',
);
+sub BUILDARGS {
+ my $class = shift;
+
+ if ( @_ == 1 && 'ARRAY' eq ref $_[0] ) {
+ return {
+ first_name => $_[0]->[0],
+ last_name => $_[0]->[1],
+ };
+ }
+ else {
+ return $class->SUPER::BUILDARGS(@_);
+ }
+}
+
sub full_name {
my $self = shift;
$self->account->owner($self);
}
+sub BUILDARGS {
+ my $class = shift;
+
+ if ( @_ == 1 && 'ARRAY' eq ref $_[0] ) {
+ return {
+ first_name => $_[0]->[0],
+ last_name => $_[0]->[1],
+ };
+ }
+ else {
+ return $class->SUPER::BUILDARGS(@_);
+ }
+}
+
sub full_name {
my $self = shift;