From 5d58a24acf4361c2dd5ec1ed29d4cab4853d0adb Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 19 Aug 2012 09:24:45 -0500 Subject: apparently newATTRSUB takes care of this --- Fun.xs | 13 ------------- lib/Fun.pm | 8 -------- 2 files changed, 21 deletions(-) diff --git a/Fun.xs b/Fun.xs index a9119b6..9488c80 100644 --- a/Fun.xs +++ b/Fun.xs @@ -275,19 +275,6 @@ static OP *parse_fun(pTHX_ GV *namegv, SV *psobj, U32 *flagsp) name = newSVOP(OP_CONST, 0, function_name); code = newRV_inc((SV*)newATTRSUB(floor, name, NULL, NULL, block)); - ENTER; - { - dSP; - PUSHMARK(SP); - EXTEND(SP, 2); - PUSHs(function_name); - PUSHs(code); - PUTBACK; - call_pv("Fun::_install_fun", G_VOID); - PUTBACK; - } - LEAVE; - return newOP(OP_NULL, 0); } else { diff --git a/lib/Fun.pm b/lib/Fun.pm index 9e18e38..abd62be 100644 --- a/lib/Fun.pm +++ b/lib/Fun.pm @@ -59,14 +59,6 @@ sub fun { return $code; } -sub _install_fun { - my ($name, $code) = @_; - - my $caller = caller; - no strict 'refs'; - *{ $caller . '::' . $name } = $code; -} - =head1 BUGS No known bugs. -- cgit v1.2.3-54-g00ecf