cast

# given 123

my $num = cast(123); # Data::Object::Number
my $str = cast(123, 'string'); # Data::Object::String

The cast function returns a data object for the argument provided. If the data passed is blessed then that same object will be returned.

cast(Any $arg1, Str $type) : Any

function

5 POD Errors

The following errors were encountered while parsing the POD:

Around line 12:

Unknown directive: =name

Around line 16:

Unknown directive: =usage

Around line 23:

Unknown directive: =description

Around line 28:

Unknown directive: =signature

Around line 32:

Unknown directive: =type