Skip Menu |

This queue is for tickets about the Math-GMP CPAN distribution.

Report information
The Basics
Id: 17775
Status: resolved
Priority: 0/
Queue: Math-GMP

People
Owner: Nobody in particular
Requestors: bart.lateur [...] pandora.be
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.04
Fixed in: (no value)



Subject: use Math::GMP qw(:constant) messes up eval
The following snippet use warnings; use Math::GMP qw(:constant); my $expr = '1024*1024'; my $temp = eval $expr; die $@ if $@; warn "OK"; produces the following error (in $@): Constant(undef): $^H{integer} is not defined at (eval 1) line 1, at end of line Constant(undef): $^H{integer} is not defined at (eval 1) line 1, at end of line The error goes away if the tag ":constant" is dropped from the use statement. This is Math::GMP 2.04, on PXPerl/Win32, perl 5.8.7, but I've heard other people say it happens on other platforms/perl versions too.
On Mon Feb 20 20:11:50 2006, guest wrote: Show quoted text
> The following snippet > > use warnings; > use Math::GMP qw(:constant); > my $expr = '1024*1024'; > my $temp = eval $expr; > die $@ if $@; > warn "OK"; > > produces the following error (in $@): > > Constant(undef): $^H{integer} is not defined at (eval 1) line 1, at > end of line > Constant(undef): $^H{integer} is not defined at (eval 1) line 1, at > end of line > > The error goes away if the tag ":constant" is dropped from the use > statement. > > This is Math::GMP 2.04, on PXPerl/Win32, perl 5.8.7, but I've heard > other people say it happens on other platforms/perl versions too.
shlomif@telaviv1:~/progs/perl/cpan/Math/GMP/Math-GMP$ cat Test.pl #!/usr/bin/perl use strict; use warnings; use warnings; use Math::GMP qw(:constant); my $expr = '1024*1024'; my $temp = eval $expr; die $@ if $@; warn "OK"; shlomif@telaviv1:~/progs/perl/cpan/Math/GMP/Math-GMP$ perl Test.pl OK at Test.pl line 10. shlomif@telaviv1:~/progs/perl/cpan/Math/GMP/Math-GMP$ Seems to working - closing as OLD. Regards, -- Shlomi Fish