Perl-Toolchain-Gang / Software-License

perl representation of common software licenses
18 stars 40 forks source link

Apache_2_0 license does not replace year and copyright holder #76

Closed atoomic closed 3 years ago

atoomic commented 3 years ago

Steps to reproduce:

When generating one Apache_2_0 license, we can see that the line looks like a template Copyright [yyyy] [name of copyright owner]

> perl -MSoftware::License::Apache_2_0 -E 'say Software::License::Apache_2_0->new( { holder => "me", year => 2021 } )->fulltext' | grep yyyy
   Copyright [yyyy] [name of copyright owner]

we could expect an output like Copyright 2021 me in the case described above

Is it a mistake? or is it by design?

Leont commented 3 years ago

Yeah, that looks like a mistake.

atoomic commented 3 years ago

I've added a unit test and fix candidate via 7eda9a603a460a2c1e634c6377d65b8107ee7ea6

Leont commented 3 years ago

Actually, on further look it appears that's wrong. It is an example in the appendix, it's not in the license itself, so it is deliberate.

atoomic commented 3 years ago

then let's close that case by design, I still think this is very ambiguous you are right the text block is a recipe

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.
   Copyright [yyyy] [name of copyright owner]

but should not we add it somewhere? is it enough to add that line to the header?