From: Jesse Luehrs Date: Tue, 15 Sep 2009 05:17:33 +0000 (-0500) Subject: remove dead code from when the exporter groups feature went away X-Git-Tag: 0.90~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8e1a1624b43bd27a4a742a0f271f2f054eab9a87;p=gitmo%2FMoose.git remove dead code from when the exporter groups feature went away --- diff --git a/lib/Moose/Exporter.pm b/lib/Moose/Exporter.pm index 62ec5bf..c5fa0f1 100644 --- a/lib/Moose/Exporter.pm +++ b/lib/Moose/Exporter.pm @@ -260,56 +260,6 @@ sub _make_wrapped_sub_with_meta { }; } -sub _make_wrapped_group { - my $class = shift; - my $package = shift; # package calling use Moose::Exporter - my $sub = shift; - my $export_recorder = shift; - my $keywords = shift; - my $is_removable = shift; - - return sub { - my $caller = $CALLER; # package calling use PackageUsingMooseExporter -group => {args} - - # there are plenty of ways to deal with telling the code which - # package it lives in. the last arg (collector hashref) is - # otherwise unused, so we'll stick the original package in - # there and act like 'with_caller' by putting the calling - # package name as the first arg - $_[0] = $caller; - $_[3]{from} = $package; - - my $named_code = $sub->(@_); - $named_code ||= { }; - - # send invalid return value error up to Sub::Exporter - unless (ref $named_code eq 'HASH') { - return $named_code; - } - - for my $name (keys %$named_code) { - my $code = $named_code->{$name}; - - my $fq_name = $package . '::' . $name; - my $wrapper = $class->_curry_wrapper( - $code, - $fq_name, - $caller - ); - - my $sub = subname( $fq_name => $wrapper ); - $named_code->{$name} = $sub; - - # mark each coderef as ours - $keywords->{$name} = 1; - $is_removable->{$name} = 1; - $export_recorder->{$sub} = 1; - } - - return $named_code; - }; -} - sub _curry_wrapper { my $class = shift; my $sub = shift;