This queue is for tickets about the Devel-Assert CPAN distribution.

Report information
The Basics
Id:
48579
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
0.02
Fixed in:
(no value)



Subject: assert is not usable in debugger or command line
On the command line: % perl -e 'use Devel::Assert -all; sub foo { assert(1 == 1); print "done\n"; }; foo()' forced to realloc PL_linestr for line use Devel::Assert -all; sub foo { assert; print "done\n"; }; foo() , bailing out before we crash harder at /usr/lib/perl5/site_perl/5.8.8/Devel/Assert/Parser.pm line 100. % % % perl -e 'use Devel::Assert; sub foo { assert(1 == 1); print "done\n"; }; foo()' done % In the debugger: % perl -de0 Loading DB routines from perl5db.pl version 1.28 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(-e:1): 0 DB<1> use Devel::Assert -all DB<2> sub foo { assert(1 == 1); print "done\n"; } forced to realloc PL_linestr for line ($@, $!, $^E, $,, $/, $\, $^W) = @saved;package main; $^D = $^D | $DB::db_stop; sub foo { assert; print "done\n"; }; ;, bailing out before we crash harder at /usr/lib/perl5/site_perl/5.8.8/Devel/Assert/Parser.pm line 100. at /usr/lib/perl5/site_perl/5.8.8/Devel/Assert/Parser.pm line 100 Devel::Assert::Parser::inject('Devel::Assert::Parser=HASH(0x8f890f8)', '(1 == 1, 0)') called at /usr/lib/perl5/site_perl/5.8.8/Devel/Assert.pm line 109 Devel::Assert::parse_assert('assert', 90) called at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Devel/Declare.pm line 279 Devel::Declare::linestr_callback('const', 'assert', 90) called at (eval 23)[/usr/lib/perl5/5.8.8/perl5db.pl:628] line 2 eval '($@, $!, $^E, $,, $/, $\\, $^W) = @saved;package main; $^D = $^D | $DB::db_stop; sub foo { assert; print "done\\n"; }; ;' called at /usr/lib/perl5/5.8.8/perl5db.pl line 628 DB::eval called at /usr/lib/perl5/5.8.8/perl5db.pl line 3410 DB::DB called at -e line 1 DB<3> foo() Undefined subroutine &main::foo called at (eval 24)[/usr/lib/perl5/5.8.8/perl5db.pl:628] line 2. DB<4> q % This is perl, v5.8.8 built for i386-linux-thread-multi, and running on Centos 5.3
This is a known issue (at least for one-liners) in Devel::Declare: http://rt.cpan.org/Public/Bug/Display.html?id=32040 It's opened for 11 months, and seems from replies that it can't be fixed without altering core in some ways.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.