FAQ
Greetings,



I'd like to be able to force an <error> condition, based upon some
checking within an action. Forcing an "undef" result is not
satisfactory, since the parser just assumes the sub-rule failed; I want
the whole parse to halt.



I guess I can set a global; that seems hokey.



Alexander

Search Discussions

  • Randal L. Schwartz at Jun 3, 2005 at 11:03 am
    "Alexander" == Alexander Danel writes:
    Alexander> I'd like to be able to force an <error> condition, based upon some
    Alexander> checking within an action. Forcing an "undef" result is not
    Alexander> satisfactory, since the parser just assumes the sub-rule failed; I want
    Alexander> the whole parse to halt.

    Just die.

    And no, I don't mean *you*. I mean use "die" in your code.

    --
    Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
    <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
    Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
    See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprecdescent @
categoriesperl
postedJun 1, '05 at 10:50p
activeJun 3, '05 at 11:03a
posts2
users2
websitemetacpan.org...

People

Translate

site design / logo © 2018 Grokbase