in reply to Re^2: How do I pretend a reference isn't a reference
in thread How do I pretend a reference isn't a reference

I was thinking
use yourblah; my $foo = _('this is blahblah');
at compile time, $foo doesn't get blessed.

Replies are listed 'Best First'.
Re^4: How do I pretend a reference isn't a reference
by clinton (Priest) on Nov 06, 2008 at 12:54 UTC

      That's not what my code does, nor was I saying that $c was one thing at compile time and one at run time. This is what I do:

      # init the app sub _ { 'compile time '.@_}; my $compile = _(1); sub foo { _(1) }; # finished compiling, so redefine sub _ sub _ { 'run time '.@_}; # run the code my $run = foo(); print " $compile - $run\n" __END__ compile time 1 - run time 1
      UPDATE: Meant to reply to Re^5: How do I pretend a reference isn't a reference
      No it doesnt.
      sub _ { 'compile time '.@_}; local *_ = sub { 'run time '.@_}; # the above is what your module/init code does my $c = _(1); die $c; __END__ run time 1 at - line 6.
      You were saying that $c is one thing at runtime, another at compile time. Its only something at runtime.