Skip to content

perlver should die if the script doesn't compile #32

@pryrt

Description

@pryrt

After reading this perlmonks post, I did some investigating, and narrowed it down to 3 separate bugs or feature requests, which I'm raising as three separate issues.

I would think that if the script that you pass to perlver doesn't compile, it wouldn't try to tell you what version is required. For example, the code:

code: doesnt_compile.pl

#!/usr/bin/perl

say "Hello";

Running perlver doesnt_compile.pl yields:

   ------------------------------------------------
 | file              | explicit | syntax | external |
 | ------------------------------------------------ |
 | doesnt_compile.pl | ~        | ~      | n/a      |
 | ------------------------------------------------ |
 | Minimum explicit version : ~                             |
 | Minimum syntax version   : ~                             |
 | Minimum version of perl  : v5.4.0 (default)              |
   ------------------------------------------------

I would expect this to die with some sort of error message. Maybe "cannot compile 'doesnt_compile.pl' so cannot determine minimum perl version required"

(If I add the use feature qw(say);, it will compile, and perlver correctly tells me it needs v5.10.0.)

(verified with perlver v1.40 on Perl 5.32)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions