summaryrefslogtreecommitdiffabout
path: root/lib/SlackBuild/Request/Loader/sbo.pm
authorSergey Poznyakoff <gray@gnu.org.ua>2019-03-20 12:50:47 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2019-03-20 13:57:30 (GMT)
commita297c865dd4611c4fd862e59c70ba1b72a142035 (patch) (side-by-side diff)
tree1751891a3b93a8ce8a2260e0be9ddf8d9e90f6a0 /lib/SlackBuild/Request/Loader/sbo.pm
parenta6040f631367a33f4e96759ce6ceefb759303f25 (diff)
downloadslackbuilder-a297c865dd4611c4fd862e59c70ba1b72a142035.tar.gz
slackbuilder-a297c865dd4611c4fd862e59c70ba1b72a142035.tar.bz2
Rewrite request loader.v1.0-
* lib/SlackBuild/Request.pm (load): New method. (new): Fall back to load() if given one argument. * lib/SlackBuild/Request/Auto.pm: Remove. * lib/SlackBuild/Request/Loader/dir.pm: New file. * lib/SlackBuild/Request/Loader/file.pm: New file. * lib/SlackBuild/Request/Loader/sbo.pm: New file. * lib/SlackBuild/Request/Loader/url.pm: New file. * slackbuilder: Use SlackBuild::Request->new instead of SlackBuild::Request::Auto->new * t/request.t: More tests.
Diffstat (limited to 'lib/SlackBuild/Request/Loader/sbo.pm') (more/less context) (ignore whitespace changes)
-rw-r--r--lib/SlackBuild/Request/Loader/sbo.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/SlackBuild/Request/Loader/sbo.pm b/lib/SlackBuild/Request/Loader/sbo.pm
new file mode 100644
index 0000000..bb0ec77
--- a/dev/null
+++ b/lib/SlackBuild/Request/Loader/sbo.pm
@@ -0,0 +1,15 @@
+package SlackBuild::Request::Loader::sbo;
+use strict;
+use warnings;
+use Net::SBo;
+
+our $PRIORITY = 40;
+
+sub Load {
+ my ($class, $reqname) = @_;
+ if (my ($dir,$commit) = Net::SBo->new->find($reqname)) {
+ return { package => $reqname, slackbuild_uri => "sbo://$commit/$dir"};
+ }
+}
+
+1;

Return to:

Send suggestions and report system problems to the System administrator.