I'm thinking ahead to the Parrot equivalent of Perl::Critic, which I hope will someday be able to analyze arbitrary .pbc files. One problem I foresee is that there seems to be no way to distinguish anonymous subs ("my $f = sub { 1 };") from inner blocks. Both compile down to something like this:
  .sub "_block16" :anon :lexid("23") :outer("21")

Would it be feasible to add a new PIR adverb to mark anonymous methods invented by the compiler so we can easily tell them apart from anonymous methods invented by the programmer? In Java, the former get isSynthetic=true, which makes it easier to suppress complaints about code violations in code out of the programmer's control.

Chris

Reply via email to