"kivitendo" wird komplett klein geschrieben
[kivitendo-erp.git] / scripts / rose_auto_create_model.pl
index 7793d60..14e4ba0 100755 (executable)
@@ -31,7 +31,6 @@ my %blacklist     = SL::DB::Helper::Mappings->get_blacklist;
 my %package_names = SL::DB::Helper::Mappings->get_package_names;
 
 our $form;
-our $cgi;
 our $auth;
 our %lx_office_conf;
 
@@ -56,13 +55,13 @@ sub setup {
     usage();
   }
 
-  $::lxdebug    = LXDebug->new();
+  $::lxdebug      = LXDebug->new();
   $::locale       = Locale->new("de");
   $::form         = new Form;
-  $::cgi          = new CGI('');
   $::auth         = SL::Auth->new();
-  $::user         = User->new($login);
-  %::myconfig     = $auth->read_user($login);
+  $::user         = User->new(login => $login);
+  %::myconfig     = $auth->read_user(login => $login);
+  $::request      = { cgi => CGI->new({}) };
   $form->{script} = 'rose_meta_data.pl';
   $form->{login}  = $login;
 
@@ -161,14 +160,13 @@ CODE
 sub parse_args {
   my ($options) = @_;
   GetOptions(
-    'login|user=s'  => \ my $login,
-    all             => \ my $all,
-    sugar           => \ my $sugar,
-    'no-commit'     => \ my $nocommit,
-    'dry-run'       => \ my $nocommit,
-    help            => sub { pod2usage(verbose => 99, sections => 'NAME|SYNOPSIS|OPTIONS') },
-    verbose         => \ my $verbose,
-    diff            => \ my $diff,
+    'login|user=s'      => \ my $login,
+    all                 => \ my $all,
+    sugar               => \ my $sugar,
+    'no-commit|dry-run' => \ my $nocommit,
+    help                => sub { pod2usage(verbose => 99, sections => 'NAME|SYNOPSIS|OPTIONS') },
+    verbose             => \ my $verbose,
+    diff                => \ my $diff,
   );
 
   $options->{login}    = $login if $login;