DOCUMENTATION
* cookbook
* tutorial
* example of refactoring a useful CPAN module using aspects
POINTCUTS
* new pointcuts: execution, cflowbelow, within, advice, calledby. Sure
you can implement them today with Perl treachery, but it is too much
work.
* need a way to match subs with an attribute, attributes::get()
will not work for some reason
* isa() support for method pointcuts as Gaal Yahas suggested: match
methods on class hierarchies without callbacks
* Perl join points: phasic- BEGIN/INIT/CHECK/END
* The previous items indicate a need for a real join point specification
language
WEAVING
* look into byte code manipulation with B:: modules- could be faster, no
need to mess with caller, and could add many more pointcut types. All
we need to do for sub pointcuts is add 2 gotos to selected subs.
* use Sub::Uplevel instead of Hook::LexWrap caller trick, thus we will
will play nice with other modules that use Sub::Uplevel (e.g. all the
test modules seem to use it)
* a debug flag to print out subs that were matched on match_define
* warnings when over 1000 methods wrapped
* support more pulling (vs. pushing) of aspects into packages:
attributes, package specific join points
* add whatever constructs required for mocking packages, objects,
builtins
* debugger support: break on pointcut
* allow finer control of advice execution order
REUSABLE ASPECTS
* need better example for wormhole- something less tedius
* bring back Marcel's tracing aspect and example, class invariants
example
* use Scalar-Footnote for adding aspect state to objects, e.g. in
Listenable. Problem is it is still in developer release state
* Listenable: when listeners go out of scope, they should be removed from
listenables, so you don't have to remember to remove them manually
* Listenable: should overload some operator on listenables so that it is
easier to add/remove listeners, e.g.:
$button += (click => sub { print 'click!' });
* design aspects: DBC, threading, more GOF patterns
* middleware aspects: security, load balancing, timeout/retry, distribution
* Perl aspects: add use strict/warning/Carp to all matched packages.
Actually, Spiffy, Toolkit, and Toolset do this already very nicely.
* interface with existing Perl modules for logging, tracing, param
checking, generally all things that are AOPish on CPAN. One should
be able to use it all through one consistent interface. If I have a
good set of pointcuts, I should be able to do all kinds of cross-
cutting things with them.
* UnderscoreContext aspect: subs that match will, if called with no
parameters, get $_, and if in void context, return value will set $_.
Allows you to use your subs like builtins, that fall back on $_. So if
we have a sub:
sub replace_foo { my $in = shift; $in =~ s/foo/bar; $in }
Then both calls would be equivalent:
$_ = replace_foo($_);
replace_foo;
* a generic FriendParamAppender aspect, that adds to a param list
for affected methods, any object the method requires. Heuristics
are applied to find the friend: maybe it is available in the call
flow? Perhaps someone in the call flow has an accessor that can
get it? Maybe a lexical in some sub in the call flow has it? The
point is to cover all cases where we pass objects around, so that
we don't have to. A generalization of the wormhole aspect.