X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperldelta.pod;h=9ac2964b02281302582a169000f082dc466d3ecd;hb=b851fbc1add6c3d9fa6158884279133c311a3efc;hp=15216d4ee83c858f2f892362a32bb2a8d78bbdea;hpb=3e33716fff35c87acba10f1d7630d4ad55ad58e8;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 15216d4..9ac2964 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -465,6 +465,22 @@ simply B. =item * +C allows a class to define attribute handlers. + + package MyPack; + use Attribute::Handlers; + sub Wolf :ATTR(SCALAR) { print "howl!\n" } + + # later, in some package using or inheriting from MyPack... + + my MyPack $Fluffy : Wolf; # the attribute handler Wolf will be called + +Both variables and routines can have attribute handlers. Handlers can +be specific to type (SCALAR, ARRAY, HASH, or CODE), or specific to the +exact compilation phase (BEGIN, CHECK, INIT, or END). + +=item * + B is a new compiler backend for walking the Perl syntax tree, printing concise info about ops, from Stephen McCamant. The output is highly customisable. See L.