```bitbake
SECTION = "libs"
LICENSE = "Artistic"
PR = "r3"

SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Parser-${PV}.tar.gz"

S = "${WORKDIR}/XML-Parser-${PV}"

inherit cpan

FILES_${PN} = "${PERLLIBDIRS}/auto/XML/Parser/Expat/* \
                ${PERLLIBDIRS}/auto/XML/Parser/.packlist \
                ${PERLLIBDIRS}/XML"
FILES_${PN}-dbg += "${PERLLIBDIRS}/auto/XML/Parser/Expat/.debug"
```

Add a dependency on expat-native and pass in the appropriate libarary and include directories for exapt to the makefile. NOTE: This still doesn't work since it tries to use the host headers when linking to perl. Fixing this properly will need "perl" to be installed in the staging area (currently we stage perl-native only).
user
```bitbake
SECTION = "libs"
LICENSE = "Artistic"
DEPENDS += "expat-native"
PR = "r4"

SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Parser-${PV}.tar.gz"

S = "${WORKDIR}/XML-Parser-${PV}"

EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"

inherit cpan

FILES_${PN} = "${PERLLIBDIRS}/auto/XML/Parser/Expat/* \
                ${PERLLIBDIRS}/auto/XML/Parser/.packlist \
                ${PERLLIBDIRS}/XML"
FILES_${PN}-dbg += "${PERLLIBDIRS}/auto/XML/Parser/Expat/.debug"
```
assistant