projects
/
p5sagit/p5-mst-13.2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Upgrade to Getopt::Long 2.33_03.
[p5sagit/p5-mst-13.2.git]
/
lib
/
Tie
/
Scalar.pm
diff --git
a/lib/Tie/Scalar.pm
b/lib/Tie/Scalar.pm
index
bcaad0b
..
c23c121
100644
(file)
--- a/
lib/Tie/Scalar.pm
+++ b/
lib/Tie/Scalar.pm
@@
-92,7
+92,7
@@
sub new {
sub TIESCALAR {
my $pkg = shift;
- if (defined &{"{$pkg}::new"}) {
+ if ($pkg->can('new') and $pkg ne __PACKAGE__) {
warnings::warnif("WARNING: calling ${pkg}->new since ${pkg}->TIESCALAR is missing");
$pkg->new(@_);
}