http://www.perlmonks.org?node_id=165669


in reply to Re: Backtracking.pm
in thread Backtracking.pm

Damn, i want to use it as the second argument....

guess i'm out of luck then ?

-- Joost downtime n. The period during which a system is error-free and immune from user input.

Replies are listed 'Best First'.
Re: Re: Re: Backtracking.pm
by educated_foo (Vicar) on May 10, 2002 at 16:05 UTC
    Yeah. This one has bothered me, too. I suppose you could do something like this (untested):
    sub is(&) { return $_[0] } sub goal { ... } # ... goal 'foo' is { ... }
    but it's not quite as nice. Option 2: write a source filter that takes
    goal mygoal
    and replaces it with
    goal 'mygoal', sub
    That might be a good way to go.

    /s

      Thanks for the tip, I used Filter::Simple, and it seems to do the trick :-)
      -- Joost downtime n. The period during which a system is error-free and immune from user input.