Hi, > > I think it would be useful to permit activation of all > assertions, > > one way or another: perhaps with a bare -A, or perhaps with > something > > like -A:all. I tried testing with: > > perl -A'.*' -wle 'sub foo : assertion { print "assert"; } > foo(); print "ok"' > > .. and the assertion was not activated. > > It wasn't activated because you didn't "use assertions" at all. > And BTW I think that 'use assertions' without an import list should > be disallowed. if no keys are passed the current package name is used as the filter key. Other unresolved issue is what to do with assertions appearing before any "use assertions" declaration, maybe to print a warning? > But I agree that having a bare -A equivalent to '-A.*' would be > nice. > > I have one concern : > if you say "use assertions qw/foo bar/" you need to pass -Afoo,bar > to activate the assertions in the corresponding block. I'd have > expected that -Afoo and -Abar work too (i.e. that assertion groups > are or-ed, not and-ed). well, I have found that it's more useful to have 'and' selection than 'or' selection as this allows to mantain several orthogonal criterions. i.e., if you have an application with different layers you can use the layer names as one criterion and object life-cicle can be other criterium (contructors, destructors, storing, etc). When you debug the app. it is possible you would like to see the destructors for layer III, but not all the destructors calls and all the layer III calls at the same time. Bye, - Salva