From: Dagfinn Ilmari Mannsåker Date: Mon, 8 Oct 2012 17:20:34 +0000 (+0100) Subject: Remove unused methods X-Git-Tag: v1.000005~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0d8433d918f667ef71c24c95c7b8e721f1f59bd7;p=gitmo%2FMoo.git Remove unused methods --- diff --git a/lib/Method/Generate/Constructor.pm b/lib/Method/Generate/Constructor.pm index 6c90761..bc44372 100644 --- a/lib/Method/Generate/Constructor.pm +++ b/lib/Method/Generate/Constructor.pm @@ -170,44 +170,4 @@ sub _check_required { ." }\n"; } -sub _check_isa { - my ($self, $spec) = @_; - my $acc = $self->accessor_generator; - my $captures = $self->{captures}; - my $check = ''; - foreach my $name (sort keys %$spec) { - my ($init, $isa) = @{$spec->{$name}}{qw(init_arg isa)}; - next unless $init and $isa; - my $init_str = perlstring($init); - my ($code, $add_captures) = $acc->generate_isa_check( - $name, "\$args->{${init_str}}", $isa - ); - @{$captures}{keys %$add_captures} = values %$add_captures; - $check .= " ${code}".( - (not($spec->{lazy}) and ($spec->{default} or $spec->{builder}) - ? ";\n" - : "if exists \$args->{${init_str}};\n" - ) - ); - } - return $check; -} - -sub _fire_triggers { - my ($self, $spec) = @_; - my $acc = $self->accessor_generator; - my $captures = $self->{captures}; - my $fire = ''; - foreach my $name (sort keys %$spec) { - my ($init, $trigger) = @{$spec->{$name}}{qw(init_arg trigger)}; - next unless $init && $trigger; - my ($code, $add_captures) = $acc->generate_trigger( - $name, '$new', $acc->generate_simple_get('$new', $name, $spec), $trigger - ); - @{$captures}{keys %$add_captures} = values %$add_captures; - $fire .= " ${code} if exists \$args->{${\perlstring $init}};\n"; - } - return $fire; -} - 1;