Linux::Sysfs::Module - sysfs modules
my $module = Linux::Sysfs::Module->open('tg3'); my @attrs = $Module->get_attrs; my @parms = $module->get_parms; my @sects = $module->get_sections; $module->close;
Modules are represented in sysfs under the /sys/module.
my $module = Linux::Sysfs::Module->open($name);
Opens a specific module with a given $name and returns an according Linux::Sysfs::Module instance on success or undef on failure.
$name
my $module = Linux::Sysfs::Module->open_path($path);
Opens module at specific $path. Returns a Linux::Sysfs::Module instance on success or undef on failure.
$path
$module->close;
Closes and cleans up the $module.
$module
my $parm = $module->get_parm($name);
Searches $module's parameters by $name and returns the corresponding Linux::Sysfs::Attribute instance on success or undef on failure.
my @parms = $module->get_parms;
Get the $module's list of parameters. Returns a list of Linux::Sysfs::Attribute instances.
my $sect = $module->get_section($name);
Searches $module's sections by $name and returns the corresponding Linux::Sysfs::Attribute instance on success or undef on failure.
my @sects = $module->get_sections;
Get the $module's list of sections. Returns a list of Linux::Sysfs::Attribute instances.
my $attr = $module->get_attr($name);
Searches $module's attributes by $name and returns the corresponding Linux::Sysfs::Attribute instance on success or undef on failure.
my @attrs = $module->get_attrs;
Get the $module's list of attributes. Returns a list of Linux::Sysfs::Attribute instances.
my $name = $module->name;
Returns the $module's name.
my $path = $module->path;
Returns the full path of $module in sysfs.
Florian Ragwitz <rafl@debian.org>
Copyright 2006 Florian Ragwitz, all rights reserved.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.
To install Linux::Sysfs, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Linux::Sysfs
CPAN shell
perl -MCPAN -e shell install Linux::Sysfs
For more information on module installation, please visit the detailed CPAN module installation guide.