Skip to content

Commit

Permalink
More documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyink committed Jun 7, 2022
1 parent ec8762f commit a32862e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Types/Self.pm
Expand Up @@ -175,6 +175,8 @@ This module also exports C<is_Self>, which returns a boolean.
return $me;
}
C<< is_Self( $var ) >> can also be written as C<< Self->check( $var ) >>.
=head2 C<< assert_Self >>
The module also exports C<assert_Self> which acts like C<is_Self> but instead
Expand All @@ -188,11 +190,15 @@ to check that the first argument to a function is a blessed object.
return $self;
}
C<< assert_Self( $var ) >> can also be written as C<< Self->( $var ) >>.
=head2 C<< to_Self >>
The module also exports C<to_Self> which will attempt to coerce other types
to the B<Self> type.
C<< to_Self( $var ) >> can also be written as C<< Self->coerce( $var ) >>.
=head2 C<< coercions_for_Self >>
An easy way of adding coercions to your B<Self> type for the benefit of
Expand Down

0 comments on commit a32862e

Please sign in to comment.