F
Florian Kaufmann
Hello
My copy of "Programming Perl" is telling me in Chapter 2/Context/Void
Context (and in other text parts nearby) that scalar- and list
contexts are the only real contexts. However, since wantarray lets me
distinguish between list, scalar and void context, I also can overload
my own subroutines 3 times: Depending on the 3 return values of
wantarray, I can let behave my subroutine 3 different ways, i.e.
overload it 3 times.
I assume that its just that Perl guarantees me that its builtin
operations are only overloaded in respect to scalar and list context;
never to void context?
Greetings
Flo
My copy of "Programming Perl" is telling me in Chapter 2/Context/Void
Context (and in other text parts nearby) that scalar- and list
contexts are the only real contexts. However, since wantarray lets me
distinguish between list, scalar and void context, I also can overload
my own subroutines 3 times: Depending on the 3 return values of
wantarray, I can let behave my subroutine 3 different ways, i.e.
overload it 3 times.
I assume that its just that Perl guarantees me that its builtin
operations are only overloaded in respect to scalar and list context;
never to void context?
Greetings
Flo