ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-tk
perl-tk
use Tk & use Hash::NoVivify
by Listmail other posts by this author
Jul 30 2007 10:48AM messages near this date
Segmentation faults with Perl/Tk | Re: use Tk & use Hash::NoVivify
SOURCE #!/usr/bin/perl -w
use strict;
use warnings;

use Tk;

#for the following use line, as is, will give the following warnings:
#Subroutine main::Exists redefined at C:/Perl/lib/Exporter.pm line 65.
# at C:\DATA\erpmon\testing\novivify_tests.pl line 6
#Prototype mismatch: sub main::Exists: none vs ($;@) at 
C:/Perl/lib/Exporter.pm line 65.
# at C:\DATA\erpmon\testing\novivify_tests.pl line 6
#
#now if it is changed to:
#use Hash::NoVivify;
#(thus removing qw (Exists Defined)
#or it is removed entirely (do not use Hash::NoVivify)
#it leads to the following error:
#Can't call method "IsWidget" on unblessed reference at 
C:/Perl/lib/Tk.pm line 197.
use Hash::NoVivify qw (Exists Defined);

my %TEST = (data1 =>  {
        v1 =>  5,
        v2 =>  6,
        },
        data2 =>  {
        v1 =>  3,
        },
);

if (Exists(\%TEST, qw{ data1 v2 })) {
#if (Exists(\%TEST, qw{ data2 v2 })) {
    print "Found\n";
} else {
    print "Not found\n";
}

#is this redefining Tk::Exists which was has been exported as main::exists?
#if so, should I be doing something different so that
#"use Hash::NoVivify" will not redefine Tk::Exists?
--++**==--++**==--++**==--++**==--++**==--++**==--++**==
ptk mailing list
ptk@[...].edu
https://mailman.stanford.edu/mailman/listinfo/ptk
Thread:
Listmail
Ala Qumsieh

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved