import type { ExistsResult, ExistsOptions } from './npm.js'; interface PurlObject { name: string; namespace?: string | undefined; qualifiers?: Record | undefined; subpath?: string | undefined; type?: string | undefined; version?: string | undefined; } /** * Check if a Perl module exists on CPAN. * * Queries MetaCPAN API to verify module existence and retrieve * the latest version. * * @param name - Module name (e.g., 'Moose') * @param version - Optional version to validate (e.g., '2.2206') * @param options - Optional configuration including cache * @returns Promise resolving to existence result with latest version * * @example * ```typescript * // Check if module exists * const result = await cpanExists('Moose') * // -> { exists: true, latestVersion: '2.2206' } * * // Validate specific version * const result = await cpanExists('Moose', '2.2206') * // -> { exists: true, latestVersion: '2.2206' } * * // Non-existent module * const result = await cpanExists('FakeModule') * // -> { exists: false, error: 'Module not found' } * ``` */ export declare function cpanExists(name: string, version?: string, options?: ExistsOptions): Promise; /** * Validate CPAN package URL. * CPAN namespace (author/publisher ID) must be uppercase when present. */ export declare function validate(purl: PurlObject, throws: boolean): boolean; export {};