Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Introduce CompUnitRepo.short-id
  • Loading branch information
lizmat committed Jun 16, 2014
1 parent 4dd2cc4 commit fc9dcee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/core/CompUnitRepo/Local/File.pm
Expand Up @@ -16,4 +16,6 @@ class CompUnitRepo::Local::File does CompUnitRepo::Locally {
}
@candi
}

method short-id() { 'file' }
}
2 changes: 2 additions & 0 deletions src/core/CompUnitRepo/Local/Installation.pm
Expand Up @@ -184,4 +184,6 @@ sub MAIN(:$name, :$auth, :$ver, *@pos, *%named) {
}
@candi
}

method short-id() { 'inst' }
}
5 changes: 3 additions & 2 deletions src/core/CompUnitRepo/Locally.pm
Expand Up @@ -19,11 +19,12 @@ role CompUnitRepo::Locally {
}

method Str { $!path.Str }
method gist { self.^name ~ '(' ~ $!path.Str ~ ')' }
method perl { self.^name ~ ".new('" ~ $!path.Str ~ "')" }
method gist { "{self.short-id}:{$!path.Str}" }
method perl { "CompUnitRepo.new('{self.short-id}:{$!path.Str}')" }

# stubs
method install($source, $from?) { ... }
method files($file, :$name, :$auth, :$ver) { ... }
method candidates($name, :$file, :$auth, :$ver) { ... }
method short-id() { ... }
}

0 comments on commit fc9dcee

Please sign in to comment.