rvosa has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks,

I just uploaded version 0.05 of my labor of love: Bio::Phylo

For some reason, Treedrawer.pm shows up as a documentation file instead of a proper package. I can't for the life of me figure out how that file is different than the others and why CPAN isn't indexing this file correctly.

Any suggestions what might be going on?

Thanks!

Replies are listed 'Best First'.
Re: CPAN indexes *.pm as "Documentation"?
by samtregar (Abbot) on Sep 30, 2005 at 19:59 UTC
    When I follow that link I get a Not Found page. The most recent version I can find on search.cpan.org is 0.04.

    -sam

      Perhaps it hasn't propagated over to all mirrors (although I didn't think the web interface is mirrored???).

      Is this URL not working for you?

      http://search.cpan.org/~rvosa/Bio-Phylo-0.05/

      That would be odd... it works for me...

      Update: by the way, thanks for writing and making available your e-book on creating CPAN modules. Very useful!
        Yup, when I hit that URL I see a "Not Found" screen. Maybe there's some dynamic load-balancing happening behind the scenes that's sending us to different sites.

        And thanks!

        -sam

Re: CPAN indexes *.pm as "Documentation"? (Memory leaks)
by BerntB (Deacon) on Oct 01, 2005 at 03:28 UTC
    Neat module; I've read some biochemistry out of interest.

    I am working on big object trees (see my scratch pad for an overview if you're curious) and thought I'd comment on a problem you seem to have with memory leaks (according to your CPAN docs).

    You consider inside out objects? Those seem cool, but ... new.

    I don't store references in objects -- the objects store short Id strings. A central "objOwner" object hands out the objects from the Ids. It looks like this:

    my($superObj) = $o->GetObject($o->GetSupId());

    I did it like that because I thought it would be easier to test, less error prone and would make it easier to save/restore parts of the object tree (also easier to stub for rpc).

    That it helps the GC algorithm I put under "easier to test".

    This should be clear? Ask otherwise. (I hope to upload to CPAN in a few weeks. Writes examples and UI now... :-( )

      Hey, thanks!

      I've been experimenting with something that might be what you're saying: the node class would have a number of arrays (e.g. @parent, @next_sister, @previous_sister, @first_daughter, @last_daughter). The objects are blessed references to scalars holding integers.

      Getters and setters would dereference and assign the respective arrays based on the object's integer value:
      sub set_parent { my ( $self, $parent ) = ( $_[0], $_[1] ); $parent[$$self] = $parent; return $self; } sub get_parent { my $self = $_[0]; return $parent[$$self]; }
      When you construct the node, a new, unique integer is generated by the InsideOutFactory, and when the node's DESTROY is called, the integer value is returned back to the InsideOutFactory, to push it into a pool for reuse. The instance data consists of elements of the class arrays. Kinda like this: inside-out objects using arrays?

      (Mind you, the memory leak problem so far hasn't been noticeable in day-to-day usage, but it does show up when I check with Devel::Cycle.)
        Sounds like the biggest diff is that I use 'son' or 'sub' instead of 'daughter' -- shorter. :-)

        I have a method that gives a short unique ID-string. Easier to read (a number might be confused with other data). You probably get a little more speed of using arrays and ints.

        I only store sup and an array with subs in obj and use methods to find brothers. Fewer possible bugs to keep obj updated when deleting/adding/serializing/etc.

        I have Links between objects in different parts of the tree (you don't need that, I'd guess). Would have been better to make objects out of Links but I have a small subapi to e.g. add link, del link and find links to/from obj.

        In total, this was little code and never gave me any problem. If I should redo it I'd probably let the IDs be invisible in the api, just to be cleaner.