in reply to Request for review: OO, inheritance, and a symbol table trick.

One other thing to note is that anything in the symbol table (scalar, array, hash, format, or filehandle besides sub) will show up in *stash. The trick is to see if there's anything defined for the CODE slot of the glob:
foreach (keys %{*stash} ) { next if (defined $internal{$_} || /^_/); my $sub = *{$stash->{$_}}{CODE}; next unless defined &$sub; push(@methods,$_); }
That might require a little tweaking, but you'll learn a lot. :) Oh, and if you think you'll eventually inherit from one of these driver classes, you might want to have mk_provides call SUPER() and weed out duplicates. Could come in handy.
  • Comment on Re: Request for review: OO, inheritance, and a symbol table trick.
  • Download Code