diff options
author | Julian Blake Kongslie <jblake@omgwallhack.org> | 2010-10-11 21:53:06 -0700 |
---|---|---|
committer | Julian Blake Kongslie <jblake@omgwallhack.org> | 2010-10-11 21:53:06 -0700 |
commit | 0e5be768a7128745bd1f4a6a3904eb67a131e719 (patch) | |
tree | 5cd7ce823f97a45ed3cb853b251084d4e81c17a3 /usr/src/pinyadmin/bin | |
parent | 2d90167e054a7dbbf2ccb1bb68e0160c355b1b8c (diff) | |
download | piny-code-0e5be768a7128745bd1f4a6a3904eb67a131e719.tar.gz piny-code-0e5be768a7128745bd1f4a6a3904eb67a131e719.zip |
Making libpiny saner
This is a rewrite of libpiny to make much better use of Moose, and have a
cleaner overall architecture.
Signed-off-by: Julian Blake Kongslie <jblake@omgwallhack.org>
Diffstat (limited to 'usr/src/pinyadmin/bin')
-rwxr-xr-x | usr/src/pinyadmin/bin/lsaccess | 2 | ||||
-rwxr-xr-x | usr/src/pinyadmin/bin/lsrepo | 2 | ||||
-rwxr-xr-x | usr/src/pinyadmin/bin/pinyconfig | 18 |
3 files changed, 19 insertions, 3 deletions
diff --git a/usr/src/pinyadmin/bin/lsaccess b/usr/src/pinyadmin/bin/lsaccess index b55900c..ce41fc4 100755 --- a/usr/src/pinyadmin/bin/lsaccess +++ b/usr/src/pinyadmin/bin/lsaccess @@ -5,7 +5,7 @@ use warnings; use Piny; -my $env = Piny::Environment->new( ); +my $env = Piny::Environment->instance( ); my ( $reponame ) = @ARGV; diff --git a/usr/src/pinyadmin/bin/lsrepo b/usr/src/pinyadmin/bin/lsrepo index 1587654..2d88eb5 100755 --- a/usr/src/pinyadmin/bin/lsrepo +++ b/usr/src/pinyadmin/bin/lsrepo @@ -5,8 +5,6 @@ use warnings; use Piny; -my $env = Piny::Environment->new( ); - foreach my $repo ( Piny::Repo->all_repos( ) ) { print $repo->name . "\n"; }; diff --git a/usr/src/pinyadmin/bin/pinyconfig b/usr/src/pinyadmin/bin/pinyconfig new file mode 100755 index 0000000..ec8e80a --- /dev/null +++ b/usr/src/pinyadmin/bin/pinyconfig @@ -0,0 +1,18 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use Piny; + +my ( $reponame, $attr, $value ) = @ARGV; + +$attr =~ s/\./_/g; + +my $repo = Piny::Repo->new( $reponame ); + +if ( defined $value ) { + $repo->config->$attr( $value ); +}; + +print "$attr = " . $repo->config->$attr . "\n"; |