Florian Ragwitz > Linux-Sysfs > Linux::Sysfs::Module

Download:
Linux-Sysfs-0.03.tar.gz

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

Linux::Sysfs::Module - sysfs modules

SYNOPSIS ^

        my $module = Linux::Sysfs::Module->open('tg3');

        my @attrs = $Module->get_attrs;
        my @parms = $module->get_parms;
        my @sects = $module->get_sections;

        $module->close;

DESCRIPTION ^

Modules are represented in sysfs under the /sys/module.

METHODS ^

open
    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.

open_path
    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.

close
    $module->close;

Closes and cleans up the $module.

get_parm
    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.

get_parms
    my @parms = $module->get_parms;

Get the $module's list of parameters. Returns a list of Linux::Sysfs::Attribute instances.

get_section
    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.

get_sections
    my @sects = $module->get_sections;

Get the $module's list of sections. Returns a list of Linux::Sysfs::Attribute instances.

get_attr
get_attribute
    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.

get_attrs
get_attributes
    my @attrs = $module->get_attrs;

Get the $module's list of attributes. Returns a list of Linux::Sysfs::Attribute instances.

name
    my $name = $module->name;

Returns the $module's name.

path
    my $path = $module->path;

Returns the full path of $module in sysfs.

AUTHOR ^

Florian Ragwitz <rafl@debian.org>

COPYRIGHT & LICENSE ^

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.

syntax highlighting: