-
Notifications
You must be signed in to change notification settings - Fork 3
andreasgudmundsson/p5-Devel-Unwind
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Imagine Perl had the ability to die to a labeled eval so that when you write FOO: eval {...} you could die to that labeled eval die FOO "bar"; That is essentially what Devel::Unwind gives you. Two custom keywords 'mark','unwind' are added allowing you two write use Devel::Unwind; mark FOO {...} or do {...} unwind FOO "bar"; unwind FOO "bar","baz"; unwind FOO (bless [], "Bar"); unwind FOO; Wherever you would put a block 'eval' an 'mark' expression can be used. And wherever you would 'die' you can 'unwind'. If a $SIG{__DIE__} handler is installed then it gets called on 'unwind'. The arguments to 'unwind' are treated the same way as the arguments to 'die'. Multiple arguments are joined to together, a single argument is passed through untouched unless it is a object with PROPAGATE method in which case $@ gets replaced by the return value of that method. For details read the documentation of die.
About
Learning perl internals by making mistakes.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published