--- Types-Serialiser/Serialiser.pm 2013/10/27 19:49:33 1.1 +++ Types-Serialiser/Serialiser.pm 2013/10/27 20:01:08 1.2 @@ -17,8 +17,6 @@ package Types::Serialiser; -use common::sense; - our $VERSION = 0.01; =head1 SIMPLE SCALAR CONSTANTS @@ -124,7 +122,7 @@ sub error { require Carp; - Carp::croak ("caught attempt to use Types::Serialiser::error value"); + Carp::croak ("caught attempt to use the Types::Serialiser::error value"); }; use overload @@ -133,6 +131,16 @@ "--" => \&error, fallback => 1; +=head1 NOTES FOR XS USERS + +The recommended way to detect whether a scalar is one of these objects +is to check whether the stash is the C or +C stash, and then follow the scalar reference to +see if it's C<1> (true), C<0> (false) or C (error). + +While it is possible to use an isa test, directly comparing stash pointers +is faster and guaranteed to work. + =head1 BUGS The use of L makes this module much heavier than it should be