Explore 10 of the more useful Perl modules for YAML developers
Takeaway: YAML is a data-centric markup language that relies on ASCII symbols such as hyphens, question marks, colons and commas to construct data blocks (scalar values or hashes). Like XML, YAML is machine-readable and can easily be integrated with scripting languages such as Perl. Here are 10 of the more useful CPAN YAML development modules.
This article is also available as a TechRepublic download.
Most people have heard of XML, but not as many have heard of YAML, which is a retronym for "YAML Ain't Markup Language". YAML is a data-centric markup language that relies on ASCII symbols such as hyphens, question marks, colons and commas to construct data blocks (scalar values or hashes). Like XML, YAML is machine-readable and can easily be integrated with scripting languages...and one of those scripting languages just happens to be Perl.
If you're interested in using YAML in your Perl application, though, you don't need to write a parser from scratch. CPAN, the Comprehensive Perl Archive Network, is packed to the brim with all manner of YAML goodies for Perl programmers. And this document lists the ten most useful ones for YAML development. (Table A)
Note: You can install CPAN modules directly from the Internet, by following the instructions provided.
Table A
|
Package Name |
Description |
URL |
| YAML |
This module provides an object-oriented interface to serializing Perl objects to YAML and vice-versa. It includes both a loader and a dumper, and can be used to load a stream of YAML documents into a Perl script, or convert Perl data structures into a YAML document. Use this module when you need to (de)serialize Perl data structures to YAML. |
|
| IO::YAML |
This module is useful for working with YAML document streams using an object-oriented approach. It is particularly good for incrementally or concurrently reading and writing multiple YAML documents within a single script. Use this module when you need to read or write YAML document streams. |
|
| Inline::YAML |
This module lets you directly specify YAML markup in a Perl script, using filtering methods to convert this markup into Perl data structures. Use this module to easily describe large and static Perl data structures in YAML. |
|
| YAML::Tiny |
This module provides a "tiny" implementation of the full YAML specification, making it possible to write more efficient YAML-based applications that have lower overhead and smaller memory footprints. Use this module when you need a small-footprint application without necessarily complete YAML functionality. |
|
| Config::YAML |
This module provides an object-oriented approach to managing configuration files in Perl. It uses YAML to express configuration directives, and supports both per-directory and global configuration files. Use this module when you need to create or manipulate configuration files in Perl. |
|
| YAML::Yaml2Html |
This module provides functions to convert a YAML document into an HTML page, or to dynamically build and write an HTML document from YAML markup. Use this module when you need a quick-and-dirty way to convert YAML markup into HTML. |
|
| CGI::Session:: Serialize::yaml |
This module lets you store CGI session data in a YAML container, and provides deserialization methods to access it both from Perl and other languages. Use this module if you need to construct a custom data storage container for your session-based application. |
|
| Cache::YAMLBackend |
This module provides a simple caching framework for a Web site. It allows you to cache the output of scripts and function calls as YAML, and reduce response times by rendering the cached pages to clients. If your site receives a lot of traffic, use this module to reduce server load and page processing time by occasionally providing clients with snapshots from the page cache instead of the "live" page. |
|
| YAML::Active |
This module provides a unique way to combine Perl application logic with the simplicity of YAML structures, by providing a framework to nest structures and logic. Use this module when you want to embed business logic into a data structure, to create reusable objects that can be transferred across applications. |
|
| Test::YAML |
This module provides a framework for you to test YAML class implementations. It is particularly good at building reusable data driven patterns. Use this module when you need to build a testing framework for YAML-based Perl applications. |
White Papers, Webcasts, and Downloads
- Email Security and Archiving - Clearer in the Cloud Google The time is NOW for businesses and organizations of all sizes to implement ... Download Now
- Why Isn't Server Virtualization Saving Us More? A Few Small Changes May Dramatically Increase Your Efficiency VMware Ever wonder why your company isn't saving more from its server virtualization? Making a few small changes could dramatically increase your efficiency. Download Now
- Five Steps to Determine When to Virtualize YourServers VMware Thinking of virtualizing the servers at your company? Use this step-by-step guide to determine when's the best time to make your big move. Download Now
- The Scalable Enterprise: VMware ESX Server on the Dell PowerEdge 6650 Dell This paper introduces the server virtualization software, VMware ESX ... Download Now
- The Impact of Virtualization Software on Operating Environments VMware Today's use of virtualization technology allows IT professionals to ... Download Now
Article Categories
- Security
- Security Solutions, IT Locksmith
- Networking and Communications
- E-mail Administration NetNote, Cisco Routers and Switches
- CIO and IT Management
- Project Management, CIO Issues, Strategies that Scale
- Desktops, Laptops & OS
- Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
- Data Management
- Oracle, SQL Server
- Servers
- Windows NT, Linux NetNote, Windows Server 2003
- Career Development
- Geek Trivia
- Software/Web Development
- Web Development Zone, Visual Basic, .NET

