From 189b85e09c80c886e37eab515b25525a45b4a4c2 Mon Sep 17 00:00:00 2001 From: Angelo Naselli Date: Tue, 21 Jul 2015 11:57:55 +0200 Subject: removed you dependency form backends, left in Shared only atm. if localization is changed from default has to be passed to constructor now --- lib/ManaTools/Shared/urpmi_backend/tools.pm | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'lib/ManaTools/Shared/urpmi_backend/tools.pm') diff --git a/lib/ManaTools/Shared/urpmi_backend/tools.pm b/lib/ManaTools/Shared/urpmi_backend/tools.pm index 05768c9f..4997f586 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 -- cgit v1.2.1