From 50d5baf49c6f4907f8061ac05a43d0fb9d1e2030 Mon Sep 17 00:00:00 2001 From: matteo Date: Sat, 5 Jul 2014 13:32:14 +0300 Subject: improved pod documentation --- lib/AdminPanel/Module/Proxy.pm | 70 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/lib/AdminPanel/Module/Proxy.pm b/lib/AdminPanel/Module/Proxy.pm index afe7736..3a7ea6c 100644 --- a/lib/AdminPanel/Module/Proxy.pm +++ b/lib/AdminPanel/Module/Proxy.pm @@ -99,6 +99,35 @@ sub _SharedUGUIInitialize { $self->sh_gui( AdminPanel::Shared::GUI->new() ); } +#============================================================= + +=head2 init_proxy + +=head3 DESCRIPTION + +=over 4 + +=item This method does initialize the proxy attribute provided by this class. + +=item $self->proxy is structured as follows: + +=over 6 + +=item B the string with the list of the excluded domains/addresses + +=item B the url of the http proxy + +=item B the url of the https proxy + +=item B the url for the ftp proxy + +=back + +=back + +=cut + +#============================================================= sub init_proxy { my %p = ( @@ -140,12 +169,53 @@ sub start { $self->_manageProxyDialog(); }; +#============================================================= + +=head2 ask_for_X_restart + +=head3 INPUT + + $self: this object + +=head3 DESCRIPTION + + This method shows a message box warning the user + that a X server restart is required + +=cut + +#============================================================= + sub ask_for_X_restart { my $self = shift; $self->sh_gui->warningMsgBox({title=>$self->loc->N("X Restart Required"),text=>$self->loc->N("You need to log out and back in again for changes to take effect"),richtext=>1}); } +#============================================================= + +=head2 validate + +=head3 INPUT + + $self: this object + + $proxy: the hash containing what returns from getVarFromSh + eventually modified by the user + +=head3 DESCRIPTION + + This method returns true if the each value match + certain conditions like the leading http:// for http proxy + or https:// for the https proxy, etc. + + $proxy is passed by reference thus $proxy->{no_proxy} value + is sanitized (trimmed). + +=cut + +#============================================================= + sub validate { my $self = shift; my $proxy = shift; -- cgit v1.2.1