diff options
author | Stefan Kangas <skangas@skangas.se> | 2011-03-21 22:31:02 +0100 |
---|---|---|
committer | Stefan Kangas <skangas@skangas.se> | 2011-03-21 22:31:02 +0100 |
commit | c7701570975feab6dd268802c6f552381d691529 (patch) | |
tree | 7aa9312668e2e6c98586ab1d07d09b1543b4439d /fripost-newdomain | |
parent | 7a522692d79d68d276fad9edf233530f68dadb7e (diff) |
Updates
Diffstat (limited to 'fripost-newdomain')
-rwxr-xr-x | fripost-newdomain | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fripost-newdomain b/fripost-newdomain index cf781ed..99c2ce3 100755 --- a/fripost-newdomain +++ b/fripost-newdomain @@ -3,6 +3,7 @@ use 5.010_000; use warnings; use strict; +use utf8; =head1 NAME @@ -10,8 +11,6 @@ fripost-newdomain - Add a new domain to the system =cut -our $VERSION = '0.01'; - use FindBin qw($Bin); use lib "$Bin/lib"; @@ -27,7 +26,7 @@ use YAML::Syck; our $conf = LoadFile('default.yml'); GetOptions( - 'dbi_dsn' => \$conf->{dbi_dsn}, + 'dbi_dsn' => \$conf->{dbi_dsn}, 'admuser=s' => \$conf->{admuser}, 'admpass=s' => \$conf->{admpass}, 'pretend' => \$conf->{pretend}, @@ -38,13 +37,12 @@ my $schema = Fripost::Schema->connect( $conf->{dbi_dsn}, $conf->{admuser}, $conf->{admpass}, {} #\%dbi_params ); -say "Adding a new domain."; - my %domain; $domain{domain} = prompt "Domain name: "; -$domain{description} = prompt_username("User to associate domain with: "); +$domain{description} = prompt_email("Belongs to user: ", 'is_user'); ## TODO: Make sure the user does exists +## TODO: Warn if the user has a domain already if ($conf->{pretend}) { say "Nothing to do since we are only pretending..."; |