Linux::Sysfs - Perl interface to libsysfs
use Linux::Sysfs; my $path = Linux::Sysfs->get_mnt_path(); my $module = Linux::Sysfs::Module->open('usbcore'); my @parms = $module->get_sections; $module->close;
Linux::Sysfs' purpose is to provide a consistent and stable interface for querying system device information exposed through the sysfs filesystem. The library implements functions for querying filesystem information, such as reading directories and files. It also contains routines for working with buses, classes, and the device tree.
The functionality of this module is split up between several packages. See the other packages under the Linux::Sysfs:: namespace for the full documentation.
The following libsysfs constants may be imported.
All constants will be exported when using the ':all' tag when importing.
my $path = Linux::Sysfs->get_mnt_path();
Finds the mount path for filesystem type "sysfs". Returns undef on failure.
Linux::Sysfs requires libsysfs version 2.0.0 or later. See http://linux-diag.sourceforge.net/Sysfsutils.html.
This module currently doesn't work with any version of libsysfs smaller than 2.0.0.
In the current implementation of Linux::Sysfs it's not possible to free the objects when they get destroyed automatically. Therefor you should care about calling close() for each object when you don't need it anymore.
Florian Ragwitz <email@example.com>
Please report any bugs or feature requests to <firstname.lastname@example.org>, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Linux-Sysfs. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
You can also look for information at:
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.