Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Hi,
Below is the mail I sent to John Barbee:

Hi John,

When working I am trying to get a directory object and go over all of its sub directories.
I found out that when I am asking for the name of the subdir object, I get an error message.

The error message is:
Can't call method "extension" on an undefined value at /usr/lib/perl5/site_perl/5.6.1/Apache/CVS/File.pm line 231 (#1 +) (F) You used the syntax of a method call, but the slot filled by t +he object reference or package name contains an undefined value. Som +ething like this will reproduce the error:
Looking on the subdir object I saw its rcsconfig object is undef.
Looking in sub load in Apache::CVS::Directory I saw the following:
foreach my $path ( @directories ) { $self->push('directory', Apache::CVS::Directory->new($self->path() . "/$pat +h")); }
And:
foreach my $path ( @files ) { if ( $path =~ /,v$/ ) { $self->push('file', Apache::CVS::File->new($self->path() . "/$path +", $self->rcs_confi +g())); } else { $self->push('plain_file', Apache::CVS::PlainFile->new($self->path() . "/ +$path")); } }

The bottom line is - just by fixing the directory object creation to work like the file creation by sending the $self->rcsconfig object it seems I fixed the problem.
Is it a bug ?
Maybe you did this for a reason, and I harm something else by fixing it like that ?
If it is a bug, and this is a good fix, how do we proceed to release a new version ?
Thanks,
And I will appriciate a quick response,
shushu

In reply to Maybe a bug in Apache::CVS::Directory by shushu
in thread CVS repository via Perl by shushu

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (10)
    As of 2021-01-22 08:24 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Notices?