---
name: "Parse::CPAN::Packages::Package"
section: "3pm"
platform: "linux"
package: "libparse-cpan-packages-perl"
version: "2.40-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Parse::CPAN::Packages::Package"
---

# Parse::CPAN::Packages::Package(3pm)

represents a CPAN package

## NAME

Parse::CPAN::Packages::Package - represents a CPAN package

## DESCRIPTION

Represents a CPAN Package. Note: The functions filename and file\_content work only if a mirror directory was supplied for parsing or the package file was situated inside a cpan mirror structure.

## METHODS

### filename

Tries to guess the name of the file containing this package by looking through the files contained in the distribution it belongs to.

### file\_content

Tries to return the contents of the file returned by **filename()**.

### subs

Experimental function. Tries to return the names of all subs in the package.

### has\_matching\_sub( $regex )

Experimental function. Tries to see if any sub name in the package matches the regex.
