Click here to get back home

Bug found in Open Perl IDE perl5db.pl module

 HomeNewsGroups | Search
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Bug found in Open Perl IDE perl5db.pl module mattsteel 07-30-2008
Posted by mattsteel on July 30, 2008, 5:21 am
Please log in for more thread options
Hello all.

I'm using this IDE since months, and have to say this is a good IDE,
light, simple, easy to use, but not bug-free ;-)

I found a subtle bug in perl5db.pl module (that is shipped with the
IDE for Windows available from SurceForge);

Trying this piece of script:

my $code =3D sub { print "hello\n" } ;
print "Let's call $code\n";
$code->();
print "Done.\n";

During a normal debug session, moving the mouse over the variable
$code (that is a code-reference i.e. ref($code) returns CODE), the IDE
replies with an =93<undef>=94 which is not true. The same thing happens
listing $code in the =93variable=94 watch-window.

I tried to fix it and patched the perl5db.pl module to handle this
case, so the IDE replies something like
=93$code: code =3D 0x1a81c40=94.

Since the module source is more than 700 lines long, I think useful
giving here the four chunks I added: I simply added another "elsif"
case just before the ending "else", so you should be able to insert
these few lines directly in your dbTemplate.txt in the correct
position.

#within SizeOfDerefValue sub:
} elsif ($refType eq 'CODE') {
return length($reference);

#within ShortEval sub:
} elsif ($refType eq 'CODE') {
$reference =3D~ /\((.*)\)/;
return "code =3D $1";

#within LongEval sub:
} elsif ($refType eq 'CODE') {
$reference =3D~ /\((.*)\)/;
$retValue =3D "code =3D $1";

#within ShowDerefValues sub:
} elsif ($refType eq 'CODE') {
$type =3D "code";
$reference =3D~ /\((.*)\)/;
$value =3D "$1";

I hope this helps.

Regards.

Posted by smallpond on July 30, 2008, 1:16 pm
Please log in for more thread options
> Hello all.
>
> I'm using this IDE since months, and have to say this is a good IDE,
> light, simple, easy to use, but not bug-free ;-)
>
> I found a subtle bug in perl5db.pl module (that is shipped with the
> IDE for Windows available from SurceForge);
>
> Trying this piece of script:
>
> my $code =3D sub { print "hello\n" } ;
> print "Let's call $code\n";
> $code->();
> print "Done.\n";
>
> During a normal debug session, moving the mouse over the variable
> $code (that is a code-reference i.e. ref($code) returns CODE), the IDE
> replies with an =93<undef>=94 which is not true. The same thing happens
> listing $code in the =93variable=94 watch-window.
>
> I tried to fix it and patched the perl5db.pl module to handle this
> case, so the IDE replies something like
> =93$code: code =3D 0x1a81c40=94.
>
> Since the module source is more than 700 lines long, I think useful
> giving here the four chunks I added: I simply added another "elsif"
> case just before the ending "else", so you should be able to insert
> these few lines directly in your dbTemplate.txt in the correct
> position.
>
> #within SizeOfDerefValue sub:
> } elsif ($refType eq 'CODE') {
> return length($reference);
>
> #within ShortEval sub:
> } elsif ($refType eq 'CODE') {
> $reference =3D~ /\((.*)\)/;
> return "code =3D $1";
>
> #within LongEval sub:
> } elsif ($refType eq 'CODE') {
> $reference =3D~ /\((.*)\)/;
> $retValue =3D "code =3D $1";
>
> #within ShowDerefValues sub:
> } elsif ($refType eq 'CODE') {
> $type =3D "code";
> $reference =3D~ /\((.*)\)/;
> $value =3D "$1";
>
> I hope this helps.
>
> Regards.


You might want to post this on Sourceforge if that's where the project
is located.

--S

Similar ThreadsPosted
install_driver(Oracle) failed: Can't load 'C:/Perl/site/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:The specified procedure could not be found at C:/Perl/lib/DynaLoader.pm line 230. October 14, 2005, 3:08 am
IMPORTANT WEBSITES ARE FOUND OPEN ALL WEBSITES AND MAKE MORE USE OF IT....... 1.latest antivirussoftware 2.library softwares 3.software projects 4.software cracks 5.download accelerator plus 6.mobile themes 7.mobile softwares(for nokia,samsung,son July 19, 2007, 1:50 pm
"Found Perl" January 17, 2005, 10:10 pm
perl cpan autobundle not found February 10, 2009, 8:20 pm
Perldoc: No documentation on perl found [newbie] December 10, 2004, 1:22 pm
Perl 5.00404 - Label not found for "next " , next() function January 11, 2007, 1:35 pm
strawberry perl: Form method not found March 23, 2008, 12:09 am
dmake.exe: Error: -- 'C:\Perl\libConfig.pm' not found, and can't be made April 18, 2009, 4:30 pm
Thanks for reply to Perl core dump issue .. i have found a work around ... February 3, 2005, 9:28 pm
anyone here tried higher order perl by dominus? I found it free online and it seems very interesting July 26, 2006, 12:19 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Driving a better car - Fuelzilla.com

Cabling site for homeowners and pros alike - Cabling-Design.com

Friends:

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap