develooper Front page | perl.perl5.porters | Postings from September 2000

[ID 20000915.008] Bug in Diagnostics?

Thread Next
From:
Rani Pinchuk
Date:
September 15, 2000 07:27
Subject:
[ID 20000915.008] Bug in Diagnostics?
Message ID:
20000915.14273200@localhost.localdomain
Hello all,

The link http://perlhacker.org/p5p-faq didn't work for us (we got 404), 
so we are sorry if we write to the wrong place. 

Koen Bossaert - a colleague of mine - wrote something and after solving 
and cleaning away the rest of the correct code, we could get only the 
"bug":


The file bug.pl looks like:

  #!/usr/local/bin/perl
  #
  #
  use diagnostics;
  use Caller;

 
The file Caller.pm looks like:

  package Caller;

  use Bug;

  1;

The file Bug.pm looks like

  package Bug;
  use strict;

  sub cause {
      my $vars;
      if (1) {
          $vars->{node_name} = $vars->{nodes[$vars->{i}]}->node_name;
      }
  }

  1;

As might see, the long line of Bug.pm should be:

          $vars->{node_name} = $vars->{nodes}[$vars->{i}]->node_name;

The problem was that when we run it we get only:

  Goto undefined subroutine &Carp::longmess_heavy at 
/usr/lib/perl5/5.6.0/Carp.pm line 98.


Nothing else! If we skip the Caller (so bug.pl uses Bug directly) we get:
  syntax error at Bug.pm line 7, near "nodes["
  BEGIN failed--compilation aborted at ./bug.pl line 5 (#1)
  Goto undefined subroutine &Carp::longmess_heavy at 
/usr/lib/perl5/5.6.0/Carp.pm line 98.

Here we get some hint about what is our bug. 

Is this a bug in diagnostics? Is this bug already known?

Thanks,

Rani.





Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About