Permalink
Browse files

X::ControlFlow{,::Return}

  • Loading branch information...
1 parent 4839ea0 commit c14524866def7f4b18d8e85b778088bba3aac3f9 @moritz moritz committed Aug 24, 2012
Showing with 48 additions and 0 deletions.
  1. +33 −0 lib/X/ControlFlow.pod
  2. +15 −0 lib/X/ControlFlow/Return.pod
View
@@ -0,0 +1,33 @@
+=begin pod
+
+=TITLE class X::ControlFlow
+
+ class X::ControlFlow is Exception { }
+
+Thrown when a control flow construct (such as C<next> or C<redo>) is called
+outside the dyanmic scope of an enclosing construct that is supposed to catch
+them.
+
+For example
+
+ last
+
+dies with
+
+ last without loop construct
+
+=head1 Methods
+
+=head2 illegal
+
+ method illegal returns Str:D
+
+Returns the name of the control flow command that was called.
+
+=head2 enclosing
+
+ method enclosing returns Str:D
+
+Returns the name of the missing enclosing construct.
+
+=end pod
@@ -0,0 +1,15 @@
+=begin pod
+
+=TITLE class X::ControlFlow::Return
+
+ class X::ControlFlow::Return is X::ControlFlow { }
+
+Thrown when a C<return> is called from outside a routine.
+
+ return
+
+dies with
+
+ Attempt to return outside of any Routine
+
+=end pod

0 comments on commit c145248

Please sign in to comment.