diff options
author | Oliver Tappe | 2009-06-09 20:05:47 +0200 |
---|---|---|
committer | Oliver Tappe | 2009-06-09 20:05:47 +0200 |
commit | 4a683e74a6afd9896df3c32b9d9d334e4599f7d3 (patch) | |
tree | 1513b6f3aac3d803f22022401cc470d97d45d796 /os-plugins | |
parent | * fixed pretty stupid bug that involved mixed use of bufferd/non-buffered IO (diff) | |
download | core-4a683e74a6afd9896df3c32b9d9d334e4599f7d3.tar.gz core-4a683e74a6afd9896df3c32b9d9d334e4599f7d3.tar.xz core-4a683e74a6afd9896df3c32b9d9d334e4599f7d3.zip |
* fixed a whole lot of circular references which I found when researching #451
* some minor cleanups along the way
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2944 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins')
-rw-r--r-- | os-plugins/OpenSLX/OSPlugin/Base.pm | 5 | ||||
-rw-r--r-- | os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm | 3 | ||||
-rw-r--r-- | os-plugins/plugins/infoscreen/OpenSLX/Distro/Base.pm | 4 | ||||
-rw-r--r-- | os-plugins/plugins/kiosk/OpenSLX/Distro/Base.pm | 4 | ||||
-rw-r--r-- | os-plugins/plugins/profile/OpenSLX/Distro/Base.pm | 14 | ||||
-rw-r--r-- | os-plugins/plugins/qemukvm/OpenSLX/Distro/Base.pm | 4 | ||||
-rw-r--r-- | os-plugins/plugins/syslog/OpenSLX/Distro/Base.pm | 4 | ||||
-rw-r--r-- | os-plugins/plugins/virtualbox/OpenSLX/Distro/Base.pm | 4 | ||||
-rw-r--r-- | os-plugins/plugins/vmware/OpenSLX/Distro/Base.pm | 4 | ||||
-rw-r--r-- | os-plugins/plugins/x11vnc/OpenSLX/Distro/Base.pm | 4 | ||||
-rw-r--r-- | os-plugins/plugins/xserver/OpenSLX/Distro/Base.pm | 3 |
11 files changed, 44 insertions, 9 deletions
diff --git a/os-plugins/OpenSLX/OSPlugin/Base.pm b/os-plugins/OpenSLX/OSPlugin/Base.pm index d51a8b38..2af0f04c 100644 --- a/os-plugins/OpenSLX/OSPlugin/Base.pm +++ b/os-plugins/OpenSLX/OSPlugin/Base.pm @@ -60,6 +60,8 @@ implementation, please drop a mail to: ot@openslx.com, or join the IRC-channel =cut +use Scalar::Util qw( weaken ); + use OpenSLX::Basics; use OpenSLX::OSPlugin::Roster; @@ -96,6 +98,9 @@ sub initialize $self->{'os-plugin-engine'} = shift; $self->{'distro'} = shift; + + weaken($self->{'os-plugin-engine'}); + # avoid circular reference between plugin and its engine return; } diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm index eb2d1713..ef82f301 100644 --- a/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm +++ b/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm @@ -19,6 +19,7 @@ use warnings; our $VERSION = 1.01; # API-version . implementation-version use File::Basename; +use Scalar::Util qw( weaken ); use OpenSLX::Basics; use OpenSLX::Utils; @@ -37,6 +38,8 @@ sub initialize { my $self = shift; $self->{engine} = shift; + weaken($self->{'engine'}); + # avoid circular reference between distro and its engine return 1; } diff --git a/os-plugins/plugins/infoscreen/OpenSLX/Distro/Base.pm b/os-plugins/plugins/infoscreen/OpenSLX/Distro/Base.pm index 6cc063b8..83570d7d 100644 --- a/os-plugins/plugins/infoscreen/OpenSLX/Distro/Base.pm +++ b/os-plugins/plugins/infoscreen/OpenSLX/Distro/Base.pm @@ -18,7 +18,7 @@ use warnings; our $VERSION = 1.01; # API-version . implementation-version -use File::Basename; +use Scalar::Util qw( weaken ); use OpenSLX::Basics; use OpenSLX::Utils; @@ -37,6 +37,8 @@ sub initialize { my $self = shift; $self->{engine} = shift; + weaken($self->{engine}); + # avoid circular reference between plugin and its engine return 1; } diff --git a/os-plugins/plugins/kiosk/OpenSLX/Distro/Base.pm b/os-plugins/plugins/kiosk/OpenSLX/Distro/Base.pm index e9022cfc..8f7e506d 100644 --- a/os-plugins/plugins/kiosk/OpenSLX/Distro/Base.pm +++ b/os-plugins/plugins/kiosk/OpenSLX/Distro/Base.pm @@ -18,7 +18,7 @@ use warnings; our $VERSION = 1.01; # API-version . implementation-version -use File::Basename; +use Scalar::Util qw( weaken ); use OpenSLX::Basics; use OpenSLX::Utils; @@ -37,6 +37,8 @@ sub initialize { my $self = shift; $self->{engine} = shift; + weaken($self->{engine}); + # avoid circular reference between plugin and its engine return 1; } diff --git a/os-plugins/plugins/profile/OpenSLX/Distro/Base.pm b/os-plugins/plugins/profile/OpenSLX/Distro/Base.pm index 3b5508dc..5588a177 100644 --- a/os-plugins/plugins/profile/OpenSLX/Distro/Base.pm +++ b/os-plugins/plugins/profile/OpenSLX/Distro/Base.pm @@ -18,7 +18,7 @@ use warnings; our $VERSION = 1.01; # API-version . implementation-version -use File::Basename; +use Scalar::Util qw( weaken ); use OpenSLX::Basics; use OpenSLX::Utils; @@ -37,13 +37,15 @@ sub initialize { my $self = shift; $self->{engine} = shift; + weaken($self->{engine}); + # avoid circular reference between plugin and its engine return 1; } sub getXsessionDPath { - my $self = shift; + my $self = shift; return "/etc/X11/Xsession.d/10slx-home_env"; } @@ -51,21 +53,21 @@ sub getXsessionDPath sub getProfileDPAth { - my $self = shift; + my $self = shift; return "/etc/profile.d/slx-kdehome.sh"; } sub getKdeHome { - my $self = shift; + my $self = shift; return ".openslx/unknown/kde"; } sub getGconfPathConfig { - my $self = shift; + my $self = shift; return "/etc/gconf/2/path"; } @@ -73,7 +75,7 @@ sub getGconfPathConfig sub getGconfHome { - my $self = shift; + my $self = shift; return ".openslx/unknown/gconf"; } diff --git a/os-plugins/plugins/qemukvm/OpenSLX/Distro/Base.pm b/os-plugins/plugins/qemukvm/OpenSLX/Distro/Base.pm index 970a6379..1e3a9bfe 100644 --- a/os-plugins/plugins/qemukvm/OpenSLX/Distro/Base.pm +++ b/os-plugins/plugins/qemukvm/OpenSLX/Distro/Base.pm @@ -18,6 +18,8 @@ use warnings; our $VERSION = 1.01; # API-version . implementation-version +use Scalar::Util qw( weaken ); + use OpenSLX::Basics; use OpenSLX::Utils; @@ -36,6 +38,8 @@ sub initialize { my $self = shift; my $engine = shift; + weaken($self->{engine}); + # avoid circular reference between plugin and its engine return 1; } diff --git a/os-plugins/plugins/syslog/OpenSLX/Distro/Base.pm b/os-plugins/plugins/syslog/OpenSLX/Distro/Base.pm index 48ba5eaf..b7afec61 100644 --- a/os-plugins/plugins/syslog/OpenSLX/Distro/Base.pm +++ b/os-plugins/plugins/syslog/OpenSLX/Distro/Base.pm @@ -18,6 +18,8 @@ use warnings; our $VERSION = 1.01; # API-version . implementation-version +use Scalar::Util qw( weaken ); + use OpenSLX::Basics; use OpenSLX::Utils; @@ -35,6 +37,8 @@ sub initialize { my $self = shift; $self->{engine} = shift; + weaken($self->{engine}); + # avoid circular reference between plugin and its engine return 1; } diff --git a/os-plugins/plugins/virtualbox/OpenSLX/Distro/Base.pm b/os-plugins/plugins/virtualbox/OpenSLX/Distro/Base.pm index c5b493d7..6baa6968 100644 --- a/os-plugins/plugins/virtualbox/OpenSLX/Distro/Base.pm +++ b/os-plugins/plugins/virtualbox/OpenSLX/Distro/Base.pm @@ -18,6 +18,8 @@ use warnings; our $VERSION = 1.01; # API-version . implementation-version +use Scalar::Util qw( weaken ); + use OpenSLX::Basics; use OpenSLX::Utils; @@ -36,6 +38,8 @@ sub initialize { my $self = shift; my $engine = shift; + weaken($self->{engine}); + # avoid circular reference between plugin and its engine return 1; } diff --git a/os-plugins/plugins/vmware/OpenSLX/Distro/Base.pm b/os-plugins/plugins/vmware/OpenSLX/Distro/Base.pm index 365f8561..278ccf14 100644 --- a/os-plugins/plugins/vmware/OpenSLX/Distro/Base.pm +++ b/os-plugins/plugins/vmware/OpenSLX/Distro/Base.pm @@ -18,6 +18,8 @@ use warnings; our $VERSION = 1.01; # API-version . implementation-version +use Scalar::Util qw( weaken ); + use OpenSLX::Basics; use OpenSLX::Utils; @@ -36,6 +38,8 @@ sub initialize { my $self = shift; my $engine = shift; + weaken($self->{engine}); + # avoid circular reference between plugin and its engine return 1; } diff --git a/os-plugins/plugins/x11vnc/OpenSLX/Distro/Base.pm b/os-plugins/plugins/x11vnc/OpenSLX/Distro/Base.pm index e0ab45ae..1e6a97a5 100644 --- a/os-plugins/plugins/x11vnc/OpenSLX/Distro/Base.pm +++ b/os-plugins/plugins/x11vnc/OpenSLX/Distro/Base.pm @@ -18,7 +18,7 @@ use warnings; our $VERSION = 1.01; # API-version . implementation-version -use File::Basename; +use Scalar::Util qw( weaken ); use OpenSLX::Basics; use OpenSLX::Utils; @@ -37,6 +37,8 @@ sub initialize { my $self = shift; $self->{engine} = shift; + weaken($self->{engine}); + # avoid circular reference between plugin and its engine return 1; } diff --git a/os-plugins/plugins/xserver/OpenSLX/Distro/Base.pm b/os-plugins/plugins/xserver/OpenSLX/Distro/Base.pm index 1cd26b56..b0fc67e3 100644 --- a/os-plugins/plugins/xserver/OpenSLX/Distro/Base.pm +++ b/os-plugins/plugins/xserver/OpenSLX/Distro/Base.pm @@ -20,6 +20,7 @@ our $VERSION = 1.01; # API-version . implementation-version use File::Basename; use File::Path; +use Scalar::Util qw( weaken ); use OpenSLX::Basics; use OpenSLX::Utils; @@ -38,6 +39,8 @@ sub initialize { my $self = shift; $self->{engine} = shift; + weaken($self->{engine}); + # avoid circular reference between plugin and its engine return 1; } |