You may also want to look into the dh-make-perl package which can build a .deb package from CPAN. you can either download the module first, or you can get dh-make-perl to download it for you.
Better yet, why not just install libyaml-perl which is the CPAN YAML package already packaged for debian?
As a rule of thumb, when looking for CPAN modules on debian, check the debian packages list first - there's a very good chance that what you want will already be packaged. If it isn't, an alternative probably will be (and, usually, that alternative is the best or one of the best of a bunch of similar modules).
e.g. apt-cache-search yaml | grep perl...on my system (debian sid), it produces this list:
$ apt-cache search yaml | grep perl
libbest-perl - fallbackable module loader
libcgi-formbuilder-source-yaml-perl - Initialize FormBuilder application from YAML file
libcgi-session-serialize-yaml-perl - YAML and YAML::Syck support for CGI::Session's serializers
libclone-perl - recursively copy Perl datatypes
libconfig-any-perl - module to load configuration from different file formats
libconfig-merge-perl - umbrella interface to configuration modules
libconfig-yaml-perl - module for manipulating YAML-based configuration files
libcpan-meta-yaml-perl - reimplementation of a subset of YAML for CPAN Meta files
libdata-phrasebook-loader-yaml-perl - loader class for Data::Phrasebook using YAML
libdata-yaml-perl - Easy YAML serialisation of Perl data structures
libhtml-template-dumper-perl - Output template data in a test-friendly format
libmoosex-blessed-reconstruct-perl - Data::Visitor for creating Moose objects
libmoosex-yaml-perl - module to load Moose objects from YAML
libpadre-plugin-datawalker-perl - simple Perl data structure browser Padre
libpadre-plugin-yaml-perl - YAML support for Padre The Perl IDE
libparse-cpan-meta-perl - module to parse META.yml and other similar CPAN metadata files
libsql-translator-perl - SQL translation library
libtemplate-plugin-yaml-perl - simple Template Toolkit Plugin Interface to the YAML module
libtest-cpan-meta-perl - test module to validate package metadata for CPAN
libtest-cpan-meta-yaml-perl - test module to validate a META.yml file
libtest-yaml-meta-perl - transitional dummy package for obsolete Test::YAML::Meta
libtest-yaml-valid-perl - module to test for valid YAML
libvitacilina-perl - Perl feed aggregation library
libyaml-appconfig-perl - manage configuration files with YAML and variable references
libyaml-libyaml-perl - Perl interface to libyaml, a YAML implementation
libyaml-perl - YAML Ain't Markup Language
libyaml-shell-perl - The YAML test shell
libyaml-syck-perl - Perl module providing a fast, lightweight YAML loader and dumper
libyaml-tiny-perl - Perl module for reading and writing YAML files
perl-modules - Core Perl modules
you can then get details on each of the packages with apt-cache show, e.g.
$ apt-cache show libyaml-perl
Package: libyaml-perl
Version: 0.84-1
Installed-Size: 200
Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
Architecture: all
Depends: perl
Recommends: libyaml-libyaml-perl | libyaml-syck-perl
Suggests: libyaml-shell-perl
Description-en: YAML Ain't Markup Language
YAML is a generic data serialization language that is optimized for human
readability. It can be used to express the data structures of most modern
programming languages (including Perl, of course). YAML supports Unicode
and there are implementations of the parser in many different languages,
making it a rather portable serialization format.
.
Please note that the YAML module is currently a deprecated implementation
in Pure Perl, which is probably slow on your system. The authors intend
to change it to just be a front-end interface module for various YAML
implementations. For now, YAML::Any is a module provided for this purpose,
which simply selects the best YAML implementation available.
Homepage: http://search.cpan.org/dist/YAML/
Description-md5: 207c6e42686e3356a6c6e3a975e92075
Tag: devel::lang:perl, devel::library, implemented-in::perl
Section: perl
Priority: optional
Filename: pool/main/liby/libyaml-perl/libyaml-perl_0.84-1_all.deb
Size: 72812
MD5sum: 4e4ab9f980f050253d403002bc7e3e39
SHA1: 8f1837257d08b2eb3e7a5dbcfd73d6954b55cf98
SHA256: 6636a5794490b7bd6ddfd3f87b3e6a90b4f212d5115db641fae007e7b5
dh-make-perl --cpan YAML. Of course, that is, assuming you can't use the distrolibyaml-perl. – derobert Sep 12 '12 at 20:08