#perl - Tue 27 Mar 2007 between 13:30 and 13:39



HarzileinAni-_: windows dlls linked the right way might abstract things away
warpzerohow do i access a superclass' variable
HarzileinAni-_: but of course i assume one has to know what one does
jagermanwarpzero: You shouldn't.
HarzileinAni-_: which i don't, but am willing to learn ;)
CaelumAni-_: well, AS is built with MSVC, and the free compiler is a version of MSVC, so it should theoretically work.
warpzerojagerman, i know deep down that you're right
but i still want to
CaelumAni-_: and activestate says something about "mingw special" but I never got that to work
Ani-_Caelum: I see.
jagermanwarpzero: How about: if you need to do that, your class is broken. :)
actionCPAN upload: Params-CallbackRequest-1.17 by DWHEELER
CPANupload: Params-CallbackRequest-1.17 by DWHEELER
warpzerojagerman, well really i just want procedural code
but i want inheritance
Ani-_Perhaps you should learn either one of them properly.
Before trying to mix them in a not so very smart way.
jagermanwarpzero: You can get your superclass name, then (outside of strict refs) try to access things. It's a bad idea, though, easy to break, messy to maintain, and generally a very bad idea.
That assumes, of course, that you only have one superclass and no supersuperclasses.
warpzerono strict 'refs' is the sign of the devil
Harzileinhmm, maybe getting vanilla perl with win32 isn't such a bad idea, as i can stage stuff at home then
s/win32/mingw32/
Ani-_warpzero: do it properly or don't do it.
warpzerojagerman, so the correct way to do this to make accessors and inherit them right
Harzileinbut then i'd have to do the installer stuff myself...
but oh well, it can't be that bad
jagermanwarpzero: Yes
warpzero: And, if you want an even better approach, don't use global variables at all.
warpzerothe problem i have with that is
there's no way to use strict hash keys
jagermanstrict hash keys?
warpzeroyeah i man
i mean
if you do the whole blessed hash ref thing
its like turning strict off in a way
Ani-_warpzero: sure there is. Tie::StrictHash. But not sure if that makes sense to use.
jagermanwarpzero: How so?
warpzerojagerman, because if i misspell a hash key
it doesn't catch it
Ani-_Because you can use $some_object->{some_key} . But maybe that is why you should create accessors?
So you don't have to use $some_object->{some_key} but $some_object->get_some_key(); then you can only mis-spell it in one place.

Page: 1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106 113 

IrcArchive