On 1/24/07, Eric Wilhelm <[EMAIL PROTECTED]> wrote:
Or, perhaps both the A::Z::Archive and A::Z::Member have a handle on an
A::Z::Directory, which simply maps filenames to indices in the
archive's array, and has a rename() method.  Shouldn't be any circular
references there.  Also, major changes in the A::Z::Archive object
state (where you just want to punt the cache fixup) could rebuild the
Directory with a simple map().

Arguably, A::Z::A should be that directory and A::Z::Member just a
bunch of data.  I think it might be a failing of the A::Z object
model.  A::Z::A hands off a filehandle to A::Z::M to write the
directory entry, but since that function uses no private data of
A::Z::M (only accessors), it really could have been left in A::Z::A.

Other than the accessor itself, no code in A::Z::M ever modifies the
filename -- and it appears that the filename is only used in code to
prep and write headers, which could just as easily be in A::Z::A, I
think.

So this is the legacy of a dubious bit of OO decomposition.  Oh, well.
(I'm glad that Steffan's cache experiments went so well!)

David

Reply via email to