Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

anydata::format::passwd(3pm) [debian man page]

AnyData::Format::Passwd(3pm)				User Contributed Perl Documentation			      AnyData::Format::Passwd(3pm)

NAME
Passwd - tied hash and DBI access to passwd files SYNOPSIS
use AnyData; my $users = adTie( 'Passwd', '/etc/passwd' ); print $users->{jdoe}->{homedir}; # ... other tied hash operations OR use DBI my $dbh = DBI->connect('dbi:AnyData:'); $dbh->func('users','Passwd','/etc/passwd','ad_catalog'); my $g7 = $dbh->selectall_arrayref( qq{ SELECT username, homedir FROM users WHERE GID = '7' }); # ... other DBI/SQL operations DESCRIPTION
This module provides a tied hash interface and a DBI/SQL interface to passwd files. Simply specify the format as 'Passwd' and give the name of the file and the modules will build a hash table with the column names username passwd UID GID fullname homedir shell The username field is treated as a key column. This module is a submodule of the AnyData.pm and DBD::AnyData.pm modules. Refer to their documentation for further details. AUTHOR &; COPYRIGHT copyright 2000, Jeff Zucker <jeff@vpservices.com> all rights reserved perl v5.10.1 2004-08-17 AnyData::Format::Passwd(3pm)

Check Out this Related Man Page

AnyData::Format::HTMLtable(3pm) 			User Contributed Perl Documentation			   AnyData::Format::HTMLtable(3pm)

NAME
HTMLtable - tied hash and DBI/SQL access to HTML tables SYNOPSIS
use AnyData; my $table = adHash( 'HTMLtable', $filename ); while (my $row = each %$table) { print $row->{name}," " if $row->{country} =~ /us|mx|ca/; } # ... other tied hash operations OR use DBI my $dbh = DBI->connect('dbi:AnyData:'); $dbh->func('table1','HTMLtable', $filename,'ad_catalog'); my $hits = $dbh->selectall_arrayref( qq{ SELECT name FROM table1 WHERE country = 'us' }); # ... other DBI/SQL operations DESCRIPTION
This module allows one to treat the data contained in an HTML table as a tied hash (using AnyData.pm) or as a DBI/SQL accessible database (using DBD::AnyData.pm). Both the tiedhash and DBI interfaces allow one to read, modify, and create HTML tables from perl data or from local or remote files. The module requires that CGI, HTML::Parser and HTML::TableExtract are installed. When reading the HTML table, this module is essentially just a pass through to Matt Sisk's excellent HTML::TableExtract module. If no flags are specified in the adTie() or ad_catalog() calls, then TableExtract is called with depth=0 and count=0, in other words it finds the first row of the first table and treats that as the column names for the entire table. If a flag for 'cols' (column names) is specified in the adTie() or ad_catalog() calls, that list of column names is passed to TableExtract as a headers parameter. If the user specifies flags for headers, depth, or count, those are passed directly to TableExtract. When exporting to an HTMLtable, you may pass flags to specify properties of the whole table (table_flags), the top row containing the column names (top_row_flags), and the data rows (data_row_flags). These flags follow the syntax of CGI.pm table constructors, e.g.: print adExport( $table, 'HTMLtable', { table_flags => {Border=>3,bgColor=>'blue'}; top_row_flags => {bgColor=>'red'}; data_row_flags => {valign='top'}; }); The table_flags will default to {Border=>1,bgColor=>'white'} if none are specified. The top_row_flags will default to {bgColor=>'#c0c0c0'} if none are specified; The data_row_flags will be empty if none are specified. In other words, if no flags are specified the table will print out with a border of 1, the column headings in gray, and the data rows in white. CAUTION: This module will *not* preserve anything in the html file except the selected table so if your file contains more than the selected table, you will want to use adTie() or $dbh->func(...,'ad_import') to read the table and then adExport() or $dbh->func(...,'ad_export') to write the table to a different file. When using the HTMLtable format, this is the only way to preserve changes to the data, the adTie() command will *not* write to a file. AUTHOR &; COPYRIGHT copyright 2000, Jeff Zucker <jeff@vpservices.com> all rights reserved perl v5.10.1 2004-08-17 AnyData::Format::HTMLtable(3pm)
Man Page