Perl version string: why use EVAL EXPR?

后端 未结 4 2068
情话喂你
情话喂你 2020-12-16 11:29

I just took notice to this generated by Catalyst.pl. It is obviously some sort of unannotated hack. What is the advantage of setting up a version string like th

4条回答
  •  眼角桃花
    2020-12-16 12:21

    I may be misremembering this, but I think some automated code parsers like to see the line of code:

     our $VERSION = '0.01';
    

    But you really want $VERSION to hold a float instead of a string.

    You may want to read this article, I know I am going to.

    Oh, dear god, now I remember why I use

    our $VERSION = 20100903;
    

    style version numbers. That is just insane. I love Perl, but that is pure, refined, concentrated insanity. I won't try to summarize David Golden's article. You just have to read it and cry.

提交回复
热议问题