Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Coerce or transform with Types::Param

by 1nickt (Canon)
on Mar 21, 2021 at 12:41 UTC ( [id://11130031]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    ok( $Caption->check( $Caption->coerce('') ), 'Empty string passes' );
    
  2. or download this
    use Types::Standard qw( Maybe Str );
    use Types::Common::String qw( StrLength );
    ...
    
    
    done_testing;
    
  3. or download this
    perl 11130005-3.pl
    
    ...
    ok 5 - Empty string coerced to undef
    ok 6 - Empty string passes
    1..6
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11130031]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-03-29 14:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found