diff options
author | Matteo Pasotti <matteo.pasotti@gmail.com> | 2014-10-05 21:42:06 +0200 |
---|---|---|
committer | Matteo Pasotti <matteo.pasotti@gmail.com> | 2014-10-05 21:42:06 +0200 |
commit | 108cb44c1e86aaabf334ec3d63eebe5286b4f780 (patch) | |
tree | f56f5c0d245574689129b60f2534f77056459cc0 /lib/AdminPanel/Shared.pm | |
parent | e1fe8ea0cb369036246522e7bf9401466b0c8174 (diff) | |
parent | 5b42f3332afcc5f42e9c028113af0ad65a5acf23 (diff) | |
download | manatools-108cb44c1e86aaabf334ec3d63eebe5286b4f780.tar manatools-108cb44c1e86aaabf334ec3d63eebe5286b4f780.tar.gz manatools-108cb44c1e86aaabf334ec3d63eebe5286b4f780.tar.bz2 manatools-108cb44c1e86aaabf334ec3d63eebe5286b4f780.tar.xz manatools-108cb44c1e86aaabf334ec3d63eebe5286b4f780.zip |
Merge branch 'master' of ssh://git.mageia.org/software/adminpanel
Diffstat (limited to 'lib/AdminPanel/Shared.pm')
-rw-r--r-- | lib/AdminPanel/Shared.pm | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/AdminPanel/Shared.pm b/lib/AdminPanel/Shared.pm index b6c8fe15..51039970 100644 --- a/lib/AdminPanel/Shared.pm +++ b/lib/AdminPanel/Shared.pm @@ -89,6 +89,9 @@ our @EXPORT = qw( distName apcat find + inArray + disable_x_screensaver + enable_x_screensaver ); @@ -214,6 +217,32 @@ sub trim { return $st; } +#============================================================= + +=head2 inArray + +=head3 INPUT + + $self: this object + $item: item to search + $arr: array container + +=head3 OUTPUT + + true: if the array contains the item + +=head3 DESCRIPTION + +This method returns if an item is into the array container + +=cut + +#============================================================= +sub inArray { + my ($self, $item, $arr) = @_; + + return grep( /^$item$/, @{$arr} ); +} #============================================================= |