aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/ManaTools/Module/Clock.pm3
-rw-r--r--lib/ManaTools/Module/Services.pm2
-rw-r--r--lib/ManaTools/Module/Users.pm2
-rw-r--r--lib/ManaTools/Shared.pm2
-rw-r--r--lib/ManaTools/Shared/Services.pm13
-rw-r--r--lib/ManaTools/Shared/TimeZone.pm17
-rw-r--r--lib/ManaTools/Shared/Users.pm14
-rw-r--r--lib/ManaTools/Shared/urpmi_backend/tools.pm19
8 files changed, 23 insertions, 49 deletions
diff --git a/lib/ManaTools/Module/Clock.pm b/lib/ManaTools/Module/Clock.pm
index 35dd603..615eb62 100644
--- a/lib/ManaTools/Module/Clock.pm
+++ b/lib/ManaTools/Module/Clock.pm
@@ -91,7 +91,8 @@ has 'sh_tz' => (
sub _SharedTimeZoneInitialize {
my $self = shift;
- $self->sh_tz(ManaTools::Shared::TimeZone->new() );
+ $DB::single = 1;
+ $self->sh_tz(ManaTools::Shared::TimeZone->new(loc => $self->loc) );
}
diff --git a/lib/ManaTools/Module/Services.pm b/lib/ManaTools/Module/Services.pm
index b54bfba..72e342a 100644
--- a/lib/ManaTools/Module/Services.pm
+++ b/lib/ManaTools/Module/Services.pm
@@ -145,7 +145,7 @@ has 'sh_services' => (
sub _SharedServicesInitialize {
my $self = shift();
- $self->sh_services(ManaTools::Shared::Services->new() );
+ $self->sh_services(ManaTools::Shared::Services->new(loc => $self->loc) );
}
diff --git a/lib/ManaTools/Module/Users.pm b/lib/ManaTools/Module/Users.pm
index 0c4b1b0..4339202 100644
--- a/lib/ManaTools/Module/Users.pm
+++ b/lib/ManaTools/Module/Users.pm
@@ -156,7 +156,7 @@ has 'sh_users' => (
sub _SharedUsersInitialize {
my $self = shift();
- $self->sh_users(ManaTools::Shared::Users->new() );
+ $self->sh_users(ManaTools::Shared::Users->new(loc => $self->loc) );
}
has 'sh_gui' => (
diff --git a/lib/ManaTools/Shared.pm b/lib/ManaTools/Shared.pm
index 2059789..ddd2021 100644
--- a/lib/ManaTools/Shared.pm
+++ b/lib/ManaTools/Shared.pm
@@ -87,7 +87,6 @@ use feature 'state';
use Digest::MD5;
-use yui;
use base qw(Exporter);
our @EXPORT_OK = qw(
@@ -397,6 +396,7 @@ sub isProcessRunning {
#=============================================================
sub command_line() {
+ require yui;
state $cmdline = new yui::YCommandLine;
return $cmdline;
diff --git a/lib/ManaTools/Shared/Services.pm b/lib/ManaTools/Shared/Services.pm
index b2dc5db..7db8393 100644
--- a/lib/ManaTools/Shared/Services.pm
+++ b/lib/ManaTools/Shared/Services.pm
@@ -72,25 +72,18 @@ use ManaTools::Shared::RunProgram qw(rooted);
has 'loc' => (
is => 'rw',
- init_arg => undef,
- builder => '_localeInitialize'
+ isa => 'ManaTools::Shared::Locales',
+ lazy => 1,
+ builder => '_localeInitialize',
);
sub _localeInitialize {
my $self = shift;
- my $cmdline = new yui::YCommandLine;
- my $locale_dir = undef;
- my $pos = $cmdline->find("--locales-dir");
- if ($pos > 0)
- {
- $locale_dir = $cmdline->arg($pos+1);
- }
$self->loc(
ManaTools::Shared::Locales->new(
domain_name => 'manatools',
- dir_name => $locale_dir,
)
);
}
diff --git a/lib/ManaTools/Shared/TimeZone.pm b/lib/ManaTools/Shared/TimeZone.pm
index a380a69..744e7f9 100644
--- a/lib/ManaTools/Shared/TimeZone.pm
+++ b/lib/ManaTools/Shared/TimeZone.pm
@@ -336,26 +336,19 @@ sub _servername_config_suffix_init {
}
has 'loc' => (
- is => 'rw',
- lazy => 1,
- init_arg => undef,
- builder => '_localeInitialize'
+ is => 'rw',
+ isa => 'ManaTools::Shared::Locales',
+ lazy => 1,
+ builder => '_localeInitialize',
);
+
sub _localeInitialize {
my $self = shift;
- my $cmdline = new yui::YCommandLine;
- my $locale_dir = undef;
- my $pos = $cmdline->find("--locales-dir");
- if ($pos > 0)
- {
- $locale_dir = $cmdline->arg($pos+1);
- }
$self->loc(
ManaTools::Shared::Locales->new(
domain_name => 'manatools',
- dir_name => $locale_dir,
)
);
}
diff --git a/lib/ManaTools/Shared/Users.pm b/lib/ManaTools/Shared/Users.pm
index d9091fb..900819e 100644
--- a/lib/ManaTools/Shared/Users.pm
+++ b/lib/ManaTools/Shared/Users.pm
@@ -110,29 +110,23 @@ has 'user_face_dir' => (
has 'loc' => (
is => 'rw',
- init_arg => undef,
- builder => '_localeInitialize'
+ isa => 'ManaTools::Shared::Locales',
+ lazy => 1,
+ builder => '_localeInitialize',
);
sub _localeInitialize {
my $self = shift;
- my $cmdline = new yui::YCommandLine;
- my $locale_dir = undef;
- my $pos = $cmdline->find("--locales-dir");
- if ($pos > 0)
- {
- $locale_dir = $cmdline->arg($pos+1);
- }
$self->loc(
ManaTools::Shared::Locales->new(
domain_name => 'manatools',
- dir_name => $locale_dir,
)
);
}
+
## Used by USER (for getting values? TODO need explanations, where?)
has 'USER_GetValue' => (
default => -65533,
diff --git a/lib/ManaTools/Shared/urpmi_backend/tools.pm b/lib/ManaTools/Shared/urpmi_backend/tools.pm
index 05768c9..4997f58 100644
--- a/lib/ManaTools/Shared/urpmi_backend/tools.pm
+++ b/lib/ManaTools/Shared/urpmi_backend/tools.pm
@@ -95,26 +95,19 @@ sub _urpmi_db_backend_init {
has 'loc' => (
- is => 'rw',
- lazy => 1,
- init_arg => undef,
- builder => '_localeInitialize'
+ is => 'rw',
+ isa => 'ManaTools::Shared::Locales',
+ lazy => 1,
+ builder => '_localeInitialize',
);
+
sub _localeInitialize {
my $self = shift;
- my $cmdline = new yui::YCommandLine;
- my $locale_dir = undef;
- my $pos = $cmdline->find("--locales-dir");
- if ($pos > 0)
- {
- $locale_dir = $cmdline->arg($pos+1);
- }
$self->loc(
ManaTools::Shared::Locales->new(
domain_name => 'manatools',
- dir_name => $locale_dir,
)
);
}
@@ -351,7 +344,7 @@ sub get_package_id {
#=============================================================
-=head2 get_package_id
+=head2 pkg2medium
=head3 INPUT