Giter Site home page Giter Site logo

Comments (3)

moregan avatar moregan commented on June 19, 2024

RFC: In the 5.12 "package name version BLOCK" syntax, PPI currently can parse the version component as a float:

ppidump 'package foo 1.11;'
                    PPI::Document
                      PPI::Statement::Package
[    1,   1,   1 ]     PPI::Token::Word         'package'
[    1,   9,   9 ]     PPI::Token::Word         'foo'
[    1,  13,  13 ]     PPI::Token::Number::Float        '1.11'
[    1,  17,  17 ]     PPI::Token::Structure    ';'

though perl does recognize it:

perl -WE 'package foo 1.11 { print $VERSION }'
1.11

Should PPI force anything that can be a version to be a PPI::Token::Number::Version?

from ppi.

moregan avatar moregan commented on June 19, 2024

Statements like use 5.020 don't have their versions parsed as Versions. Going with the flow would seem to be to leave Float version numbers as Floats.

from ppi.

wchristian avatar wchristian commented on June 19, 2024

Merged into master with some refactoring.

from ppi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.