psini has asked for the wisdom of the Perl Monks concerning the following question:
I reduced the code to the minimum to reproduce the problem.
#!/usr/bin/perl use strict; use warnings; use Device::SerialPort; my $comm; sub foo { $comm=0; } $comm=new Device::SerialPort('/dev/ttyS0') or die "Error opening device\n";
And this is the error I get:
sini@ordinalfabetix:~$ ./x.pl (in cleanup) Can't call method "setcflag" on an undefined valu +e at /usr/lib/perl5/Device/SerialPort.pm line 482 during global destr +uction. sini@ordinalfabetix:~$
Sub foo is not called anywhere but if I delete it the problem disappear. Same if I delete or replace its content.
Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Strange problem with Device::SerialPort
by zentara (Cardinal) on Jun 26, 2008 at 19:09 UTC | |
by psini (Deacon) on Jun 26, 2008 at 19:22 UTC |