Skip to content

Instantly share code, notes, and snippets.

@2colours
Created October 29, 2022 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 2colours/b6f52cc16366ef9dccfd4b36917608b9 to your computer and use it in GitHub Desktop.
Save 2colours/b6f52cc16366ef9dccfd4b36917608b9 to your computer and use it in GitHub Desktop.
use License::Software:ver<0.3.*>;
unit class Ddt::License does License::Software::Abstract;
submethod aliases returns Array[Str] { Array[Str].new }
method files returns Hash:D { Hash.new }
method header returns Str:D { "This piece of software is released under licence '$!name'." }
method full-text returns Str:D { "self.header()\nFor details, contact the author." }
has Str $.name;
only method new(|) {
my $base-constructed = callsame;
dd $base-constructed;
#$base-constructed!name-rw = $name;
$base-constructed
}
method !name-rw is rw { $!name }
method note returns Str:D { '' }
method short-name returns Str:D { $!name }
method spdx returns Str:D { $!name }
submethod url returns Str:D { '' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment