On Tue, Feb 27, 2001 at 10:50:26PM +1100, Ian Brayshaw wrote: > Given the following lvalue subroutine > > sub mysub : lvalue { > $value; > } > > is there any way for mysub() to be able to determine that it > was called in an lvalue context? Yeah there is, but you're not going to like it :-) .robin. use v5.6; use Inline C => <<NOMO; U8 wantlvalue () { return cxstack[cxstack_ix].blk_sub.lval; } NOMO sub foo :lvalue { print (wantlvalue() ? "lvaluably\n" : "rvaluably\n"); my $foo } foo(); foo() = 23;
- lvalue subroutines Ian Brayshaw
- Re: lvalue subroutines Piers Cawley
- Re: lvalue subroutines Robin Houston
- Re: lvalue subroutines Piers Cawley
- Re: lvalue subroutines David Cantrell
- Re: lvalue subroutines Rob Partington
- Re: lvalue subroutines Piers Cawley
- SRN (was: lvalue subroutines) Robin Houston
- Re: SRN (was: lvalue subroutines... David Cantrell
- Re: SRN (was: lvalue subrout... Dave Hodgkinson
- Re: SRN (was: lvalue subroutines... Robin Houston
- Re: lvalue subroutines Ian Brayshaw
- Re: lvalue subroutines Robin Houston