#1 F8 does a STEP INTO on a "require" line.

closed-fixed
nobody
None
5
2001-11-25
2001-06-06
Anonymous
No

When I run the script below by hitting F9 (go) it runs
ok, but when I F8 thru it, it screws up on
the "require" line: it does a STEP INTO, then steps
thru the "require" code, finally bombing out and
claiming that Perl 5.6.1 had an error. Script works
fine if I call perl directly in a command shell. The
patch file for perl 5.6.1 is in same dir as
PerlIDE.exe.

***** The Script: *****

#!/bin/perl
# Program name: midterms.
# This prog will call a subr. from another file.

my $average;
printf ("INC bfore: %s\n", @INC);
unshift
(@INC, "C:/perl/PerlClass/Class_1/average_dir"); # Add
this to @INC paths.
printf ("INC after: %s\n", @INC);
require "sub_ave.pl";

print "\nEnter your midterm scores:\n";
@scores=split(' ',<STDIN>);

# Subroutine ave() is in file .\average_dir\sub_ave.pl.
printf ( "The average Goddamn score is
%.1f.\n",$average=ave(@scores) );

***** Contents of ./average_dir/sub_ave.pl ********

sub ave {
my($total)=0;
my(@grades)=@_;
my($num_of_grades)=$#grades + 1;
foreach $grade ( @grades ) {
$total = $total + $grade;
}
$total/$num_of_grades; # what gets returned.
}
1; # Make sure file returns TRUE or require will fail!

Discussion

  • Jürgen Güntherodt

    Logged In: YES
    user_id=165877

    This is a bug in Open Perl IDE 0.9.8 and older and will be
    fixed in release 0.9.9 !

     
  • Jürgen Güntherodt

    • summary: F8 does a STEP INTO on a "require" line. --> F8 does a STEP INTO on a "require" line.
     
  • Jürgen Güntherodt

    • summary: F8 does a STEP INTO on a "require" line. --> F8 does a STEP INTO on a "require" line.
    • status: open --> closed
     
  • Jürgen Güntherodt

    • status: closed --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks