in reply to Re^6: Hooks like Storable for Dumper?
in thread Hooks like Storable for Dumper?
I think I moderately prefer your approach, though a part of me is leery of the globals either way.
I agree. In general I'm leery of the globals too.* I would like to know why you moderately prefer my approach as your reversal hadn't occured to me at all and I'm wondering what tilts you in the direction of my proposal.
* Globals have the advantage that you can use local on them to affect dynamic changes. For instance to resolve one of your issues from another part of this thread you could create a wrapper sub that localizes $Data::Dumper::Freeze and $Data::Dumper::Thaw before calling into Data::Dumper. Using a pure object approach (like DDS) means that you have to have seperate serialization objects, which in turn makes it difficult to "override" a default set of properties for a limited duration. Anyway, I apologise for the digression, I just thought I should use this chance to explain why I think that Data::Dumper's dynamic var approach actually makes sense. (Even though at first glance it doesnt :-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Hooks like Storable for Dumper?
by xdg (Monsignor) on Jan 03, 2006 at 20:13 UTC |