Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

What's the best way to use Any YAML (not YAML::Any)

by djerius (Beadle)
on Mar 14, 2014 at 21:30 UTC ( [id://1078397]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use List::Util qw[ first ];
    my $class = first { eval "use $_; 1" } qw[ YAML::XS YAML::Syck YAML::T
    +iny YAML];
    
  2. or download this
    use List::Util qw[ first ];
    use Class::Load qw[ load_first_existing_class is_class_loaded ];
    ...
    
    my $class = ( first { is_class_loaded $_ } @CLASSES ) 
        || ( load_first_existing_class  @CLASSES );
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1078397]
Approved by davies
Front-paged by ww
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found