----- Original Message ----
From: Adrian Howard <[EMAIL PROTECTED]>

> > As you can see, I called SUPER::startup instead of SUPER::setup.
> [snip]
>
> Not that it helps solve your problem - but I tend to use multiple  
> setup routines rather than inheritance to add extra set up code to a  
> class. I generally find it reads more cleanly since I can give my  
> methods more intention revealing names.

The issue I have with that is that the setup routines run in alphabetical order 
and I was surprised to discover that another programmer wrote this as a result:

  sub zzzteardown : Tests(teardown) { ... }

I didn't really like that, but since I'm quite happy that others are now 
writing tests, I don't complain.  Still, carefully choosing setup names to run 
in alphabetical order is frustrating to me, so I prefer the superclass 
dispatching.

> You could, of course, use something like chromatic's SUPER and write  
> it as:

D'oh!  What a bloody obvious answer.  Thanks :)

Cheers,
Ovid
-- 
Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/




Reply via email to