Skip to content

Inconsistent file paths generated by provides #36

@Grinnz

Description

@Grinnz

The provides field in the CPAN meta spec specifies that "It must contain a Unix-style relative file path".

However, package_versions_from_directory returns the native file path returned by File::Find canonicalized to the current OS by File::Spec: https://metacpan.org/source/ETHER/Module-Metadata-1.000037/lib/Module/Metadata.pm#L263

This path is then appended to the prefix with a unix-style slash unconditionally by the provides method, but the rest of the path will keep its OS-dependent path separators. Thus on a Windows system you get paths like lib/Foo\Bar.pm.

This method is currently used at least by Minilla in generating the provides metadata. Ref metacpan/metacpan-web#2306

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions