Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tidy

  • Loading branch information...
commit b09f2e63b18c1296e27507c1b89d93e5a7efe392 1 parent 2e051c3
@gfx authored
Showing with 20 additions and 21 deletions.
  1. +20 −21 lib/Acme/Perl/VM.pm
View
41 lib/Acme/Perl/VM.pm
@@ -838,34 +838,33 @@ sub mark_list{
return map{ ${ $_->object_2svref } } splice @PL_stack, $mark+1;
}
-{
- our %external;
- sub apvm_extern{
- foreach my $arg(@_){
- if(ref $arg){
- if(ref($arg) ne 'CODE'){
- Carp::croak('Not a CODE reference for apvm_extern()');
- }
- $external{refaddr $arg} = 1;
+our %external;
+
+sub apvm_extern{
+ foreach my $arg(@_){
+ if(ref $arg){
+ if(ref($arg) ne 'CODE'){
+ Carp::croak('Not a CODE reference for apvm_extern()');
}
- else{
- my $stash = do{ no strict 'refs'; \%{$arg .'::'} };
- while(my $name = each %{$stash}){
- my $code_ref = do{ no strict 'refs'; *{$arg . '::' . $name}{CODE} };
- if(defined $code_ref){
- $external{refaddr $code_ref} = 1;
- }
+ $external{refaddr $arg} = 1;
+ }
+ else{
+ my $stash = do{ no strict 'refs'; \%{$arg .'::'} };
+ while(my $name = each %{$stash}){
+ my $code_ref = do{ no strict 'refs'; *{$arg . '::' . $name}{CODE} };
+ if(defined $code_ref){
+ $external{refaddr $code_ref} = 1;
}
}
}
- return;
}
+ return;
+}
- sub cv_external{
- my($cv) = @_;
- return $cv->XSUB || $external{ ${$cv} };
- }
+sub cv_external{
+ my($cv) = @_;
+ return $cv->XSUB || $external{ ${$cv} };
}
sub ddx{
Please sign in to comment.
Something went wrong with that request. Please try again.