Skip to content

Auth/Ver information is UNIT based, but specced as class etc. Propose -unit- #54

Open
@lizmat

Description

The current spec at S11:363 indicates that version/auth information of a class/module/grammar/role should be specified in the statement, e.g.

class Dog:authcpan:JRANDOM:ver<1.2.1>;

However, its counterpart:

use Dog:authcpan:JRANDOM:ver<1.2.1>;

applies to a file, therefore a UNIT, and to all code residing in that file, regardless of what is in there. In other words: -use- is just a way of smartfinding a file to load the code of.

I've therefore come to the conclusion that we need to make this more generic, and that we should have a way to identify the unit, rather than anything inside it.

I therefore propose to remove all auth/ver related information from class/module/grammar and the like, and create a new statement "unit":

unit Dog:authcpan:JRANDOM:ver<1.2.1>;

Only one -unit- statement would be valid per file. And it would be used by packagers / installers to let the system know what it is.

It should probably only be legal when reading from a file, although I could see uses for "eval" as well.

I think this would make things a lot clearer than the current specification.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions