Subject: | Get dies when it can unlink local file |
Date: | Fri, 30 Apr 2010 23:14:27 +0200 |
To: | bug-Net-TFTP [...] rt.cpan.org |
From: | Maik Hentsche <maik [...] mm-double.de> |
Hi,
When get(remote, local) tries to unlink the local file and fails, the
whole program will die with Can't use an undefined value as a symbol
reference at lib/Net/TFTP.pm line 140. Sometimes I also get line 150
and I wasn't able to reproduce what causes the difference. The root
cause of that issue is that get() does not check the return value of
the unlink which of cause may fail e.g. when it's a directory. The
applied patch fixes this bug.
The second patch adds a test subdirectory that contains a test to check
whether the newly added check works correctly. The tests introduce
dependencies on Test::More and Test::MockModule which are not reflected
in Makefile.PL. That is because I never worked with ExtUtils::MakeMaker
before. Since I often hear its usage is discouraged I wonder whether it
makes sense to learn it.
so long
Maik
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.
Message body not shown because it is not plain text.