zem / qtc-net

A short telegram sytem for Amateur Radio
Other
5 stars 0 forks source link

fix nested funktion calls as mentioned on 31C3 #43

Closed zem closed 9 years ago

zem commented 9 years ago

the problem that:


sub foo { return "bar", "baf", "bat"; }

sub bar { while ($=shift) { print "parm: $\n"; } }

bar(foo());


is printing bar, baf and bat leads to some important scope checks that many programmers are not aware of when getting data from the outside world, the problem was mentioned in a speech on 31C3 Congress and may be fixed by certain (foo())[0] whenever needed in the code.

zem commented 9 years ago

Code is fixed, test is required

zem commented 9 years ago

I guess I can close this now....