Help for this page

Select Code to Download


  1. or download this
    use B;
    sub codename {
    ...
        my $cv = B::svref_2object($coderef);
        return $cv->GV->NAME;
    }
    
  2. or download this
    use Sub::Identify qw(sub_name);
    sub foo {}
    print sub_name(\&foo);