NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
how tidy (Score:3, Interesting)
Maybe you could just follow caller() until it returns undef (or up to some appropriate max if that's a worry)... or follow caller() until it's tracked back to some srcript?
Or maybe it's time for Yet Another Level of Indirection, so that auditable things all go through an API which requires the appropriate audit log data.you wrote:
I've had objects (not with Class::DBI) which tried to determine who was modifying them. This wasn't a critical audit thing, but just for purposes of advisory record-change collision notices ("Bob just saved that record 2min ago and you'll want make changes from that more recent version"). In that case, each record had this metadata, and so it made sense (to me) for the object to gather that info. If I needed auditing, I would have stuck it in the object in that case.
I dunno... five hours of sleep in three days leaves my mind tending to wander a bit, but I don't think it's a universal evil for the object to care about who does what to it.
-matt
Reply to This