Skip Menu | will be shut down on March 1st, 2021.

This queue is for tickets about the Wx CPAN distribution.

Report information
The Basics
Id: 71256
Status: new
Priority: 0/
Queue: Wx

Owner: Nobody in particular
Requestors: user42 [...]

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

Subject: objects from tied scalars
Date: Tue, 27 Sep 2011 06:55:18 +1000
To: bug-Wx [...]
From: Kevin Ryde <user42 [...]>
Download (untitled) / with headers
text/plain 764b
In recent debian i386 wx and wxperl 0.9901, it seems a Wx::Size coming out of a tied scalar is not recognised. below gives variable is not of type Wx::Size at line 23. on attempting $frame->SetSize ($magic); Where I hoped it would run the FETCH() from the tied $magic and get Wx::wxDefaultSize. Often this sort of thing is from the XS not running magic (SvGETMAGIC or whichever one of those macros is right) before looking into the sv flags like SvOK, SvROK, etc. A contrivance like can come from "lazy scalars" deferring a value until needed, or this came up in one spot of perl-gtk lately on objects held in a Tie::IxHash (or was it a Tie::RefHash?) which end up magic to support the special features of that tie.
text/x-perl 407b
use strict; use Wx; my $app = Wx::SimpleApp->new; { package MyTiedSize; sub TIESCALAR { my $class = shift; return bless {@_}, $class; } sub FETCH { print "MyTiedSize FETCH runs\n"; return Wx::wxDefaultSize(); } } my $magic; tie $magic, 'MyTiedSize'; # print $magic,"\n"; my $frame = Wx::Frame->new (undef, -1, "Hello"); $frame->SetSize ($magic); $frame->Show; $app->MainLoop;

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to