xref: /openbsd-src/gnu/usr.bin/perl/dist/Attribute-Handlers/demo/demo_rawdata.pl (revision b39c515898423c8d899e35282f4b395f7cad3298)
1*b39c5158Smillertpackage UNIVERSAL;
2*b39c5158Smillertuse Attribute::Handlers;
3*b39c5158Smillert
4*b39c5158Smillertsub Cooked : ATTR(SCALAR) { print pop, "\n" }
5*b39c5158Smillertsub PostRaw : ATTR(SCALAR,RAWDATA) { print pop, "\n" }
6*b39c5158Smillertsub PreRaw : ATTR(SCALAR,RAWDATA) { print pop, "\n" }
7*b39c5158Smillert
8*b39c5158Smillertpackage main;
9*b39c5158Smillert
10*b39c5158Smillertmy $x : Cooked(1..5);
11*b39c5158Smillertmy $y : PreRaw(1..5);
12*b39c5158Smillertmy $z : PostRaw(1..5);
13