Devel::ModInfo::DataType - Non object-oriented module defining the data types ModInfo will describe
This module is not meant for use outside the ModInfo system.
The data type definitions that ModInfo uses are simply strings that attempt to describe Perl
data types. Since Perl doesn't have strongly typed variables or subroutine return values, it is
difficult to really nail down what these data types should be. We've settled on a collection
that allows you to adequately describe how Perl data based on how much you can predict about
the data. For example, you might know that your function returns a reference to something,
but not what that something would be. Or you might know that your method returns a blessed object,
but not what package the object will be blessed into.
- * SCALAR
While any single-valued Perl variable could be considered a scalar, what SCALAR
represents is the fact that the only thing you can predict about the value this
data type represents is that it will be a single value, rather than an array or
- * ARRAY
- * ARRAYREF
- * BLESSED
The BLESSED datatype means that all you can predict about the value is that it will
be "blessed" into a Perl package (see perltoot for more info on this).
- * BOOLEAN
Obviously, Perl doesn't explicitly support a BOOLEAN data type, but through common Perl
code, you will find uses of perl variables in a boolean context. This data type means
that the value is expected to be treated as a boolean.
- * CODEREF
- * HASH
- * HASHREF
- * INTEGER
INTEGER means the Perl variable can be expected to contain an integer value.
- * REFERENCE
Again, this data type means that all you can predict about the value is that it will be
a Perl reference. If you know the
- * STRING
- * A package name
This indicates that you know the value will contain a blessed reference to a
pre-defined package name.