method file
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 2742
mod_methods 0.3
mod_methods is an Apache module that is the sister module to myhttp_engine. more>>
mod_methods is an Apache module that is the sister module to myhttp_engine. It can be used to test that engine, or can be used to set up a simple web request framework for adding, deleting, and getting files from an Apache 2.X webserver.
Enhancements:
- A new Makefile that is less dependent on local wackiness, support for the UPDATE HTTP method, and support for the OPTIONS HTTP method.
<<lessEnhancements:
- A new Makefile that is less dependent on local wackiness, support for the UPDATE HTTP method, and support for the OPTIONS HTTP method.
Download (0.034MB)
Added: 2007-07-03 License: BSD License Price:
843 downloads
Class::Method::hash 2.08
Class::Method::hash is a Perl module that helps you create methods for handling a hash value. more>>
Class::Method::hash is a Perl module that helps you create methods for handling a hash value.
SYNOPSIS
use Class::MethodMaker
[ hash => [qw/ x /] ];
$instance->x; # empty
$instance->x(a => 1, b => 2, c => 3);
$instance->x_count == 3; # true
$instance->x = (b => 5, d => 8); # Note this *replaces* the hash,
# not adds to it
$instance->x_index(b) == 5; # true
$instance->x_exists(c); # false
$instance->x_exists(d); # true
Creates methods to handle hash values in an object. For a component named x, by default creates methods x, x_reset, x_clear, x_isset, x_count, x_index, x_keys, x_values, x_each, x_exists, x_delete, x_set, x_get.
<<lessSYNOPSIS
use Class::MethodMaker
[ hash => [qw/ x /] ];
$instance->x; # empty
$instance->x(a => 1, b => 2, c => 3);
$instance->x_count == 3; # true
$instance->x = (b => 5, d => 8); # Note this *replaces* the hash,
# not adds to it
$instance->x_index(b) == 5; # true
$instance->x_exists(c); # false
$instance->x_exists(d); # true
Creates methods to handle hash values in an object. For a component named x, by default creates methods x, x_reset, x_clear, x_isset, x_count, x_index, x_keys, x_values, x_each, x_exists, x_delete, x_set, x_get.
Download (0.087MB)
Added: 2007-07-05 License: Perl Artistic License Price:
841 downloads
Method::Declarative 0.03
Method::Declarative is a Perl module to create methods with declarative syntax. more>>
Method::Declarative is a Perl module to create methods with declarative syntax.
SYNOPSIS
use Method::Declarative
(
--defaults =>
{
precheck =>
[
[ qw(precheck1 arg1 arg2) ],
# ...
],
postcheck =>
[
[ qw(postcheck1 arg3 arg4) ],
# ...
],
init =>
[
[ initcheck1 ],
# ...
],
end =>
[
[ endcheck1 ],
# ...
],
once =>
[
[ oncecheck1 ],
] ,
package => __CALLER__::internal,
},
method1 =>
{
ignoredefaults => [ qw(precheck end once) ],
code => __method1,
},
) ;
The Method::Declarative module creates methods in a using class namespace. The methods are created using a declarative syntax and building blocks provided by the using class. This class does not create the objects themselves.
The using class invokes Method::Declarative, passing it list of key-value pairs, where each key is the name of a method to declare (or the special key --default) and a hash reference of construction directives. The valid keys in the construction hash refs are:
code
The value corresponding to code key is a method name or code reference to be executed as the method. It is called like this:
$obj->$codeval(@args)
where $obj is the object or class name being used, $codeval is the coresponding reference or method name, and @args are the current arguments for the invocation. If $codeval is a method name, it needs to be reachable from $obj.
A code key in a method declaration will override any code key set in the --defaults section.
end
The value corresponding to the end key is an array reference, where each entry of the referenced array is another array ref. Each of the internally referenced arrays starts with a code reference or method name. The remaining elements of the array are used as arguments.
Each method declared by the arrays referenced from end are called on the class where the declared method resides in an END block when Method::Declarative unloads.
Each method is called like this:
$pkg->$codeval($name[, @args]);
where $pkg is the package or class name for the method, $name is the method name, and @args is the optional arguments that can be listed in each referenced list.
end blocks are run in the reverse order of method declaration (for example, if method1 is declared before method2, method2s end declaration will be run before method1s), and for each method they are run in the order in which they are declared.
Note that this is not an object destructor, and no objects of a particular class may still exist when these methods are run.
ignoredefaults
The value corresponding to the ignoredefaults key is an array reference pointing to a list of strings. Each string must corespond to a valid key, and indicates that any in-force defaults for that key are to be ignored. See the section on the special --defaults method for details.
init
The value corresponding to the init key is identical in structure to that corresponding to the end key. The only difference is that the declared methods/code refs are executed as soon as the method is available, rather than during an END block.
once
The value corresponding to the once key is identical in structure to that corresponding to the end key. The values are used when the method is invoked, however.
If the method is invoked on an object based on a hash ref, or on the class itself, and it has not been invoked before on that object or hash ref, the methods and code refs declared by this key are executed one at a time, like this:
$obj->$codeval($name, $isscalar, $argsref[, @args ]);
where $obj is the object or class on which the method is being invoked, $codeval is the method name or code reference supplied, $name is the name of the method, $isscalar is a flag to specify if the declared method itself is being executed in a scalar context, $argsref is a reference to the method arguments (@_, in other words), and @args are any optional arguments in the declaration.
The return value of each method or code reference call is used as the new arguments array for successive iterations or the declared method itself (including the object or class name). Yes, that means that these functions can change the the object or class out from under successive operations.
Any method or code ref returning an empty list will cause further processing for the method to abort, and an empty list or undefined value (as appropriate for the context) will be returned as the declared methods return value.
package
The value coresponding to the package key is a string that determines where the declared method is created (which is the callers package by default, unless modified with a --defaults section). The string __CALLER__ can be used to specify the callers namespace, so constructions like the one in the synopsis can be used to create methods in a namespace based on the calling package namespace.
postcheck
The value coresponding to the postcheck key is identical in structure to that coresponding to the end key. The postcheck operations are run like this:
$obj->$codeval($name, $isscalar, $vref[, @args ]);
where $obj is the underlying object or class, $codeval is the method or code ref from the list, $name is the name of the declared method, $isscalar is the flag specifying if the declared method was called in a scalar context, $vref is an array reference of the currently to-be-returned values, and @args is the optional arguments from the list.
Each method or code reference is expected to return the value(s) it wishes to have returned from the method. Returning a null list does NOT stop processing of later postcheck declarations.
precheck
The precheck phase operates similarly to the once phase, except that its triggered on all method calls (even if the underlying object is not a hash reference or a class name).
Any illegal or unrecognized key will cause a warning, and processing of the affected hashref will stop. This means a --defaults section will be ineffective, or a declared method wont be created.
<<lessSYNOPSIS
use Method::Declarative
(
--defaults =>
{
precheck =>
[
[ qw(precheck1 arg1 arg2) ],
# ...
],
postcheck =>
[
[ qw(postcheck1 arg3 arg4) ],
# ...
],
init =>
[
[ initcheck1 ],
# ...
],
end =>
[
[ endcheck1 ],
# ...
],
once =>
[
[ oncecheck1 ],
] ,
package => __CALLER__::internal,
},
method1 =>
{
ignoredefaults => [ qw(precheck end once) ],
code => __method1,
},
) ;
The Method::Declarative module creates methods in a using class namespace. The methods are created using a declarative syntax and building blocks provided by the using class. This class does not create the objects themselves.
The using class invokes Method::Declarative, passing it list of key-value pairs, where each key is the name of a method to declare (or the special key --default) and a hash reference of construction directives. The valid keys in the construction hash refs are:
code
The value corresponding to code key is a method name or code reference to be executed as the method. It is called like this:
$obj->$codeval(@args)
where $obj is the object or class name being used, $codeval is the coresponding reference or method name, and @args are the current arguments for the invocation. If $codeval is a method name, it needs to be reachable from $obj.
A code key in a method declaration will override any code key set in the --defaults section.
end
The value corresponding to the end key is an array reference, where each entry of the referenced array is another array ref. Each of the internally referenced arrays starts with a code reference or method name. The remaining elements of the array are used as arguments.
Each method declared by the arrays referenced from end are called on the class where the declared method resides in an END block when Method::Declarative unloads.
Each method is called like this:
$pkg->$codeval($name[, @args]);
where $pkg is the package or class name for the method, $name is the method name, and @args is the optional arguments that can be listed in each referenced list.
end blocks are run in the reverse order of method declaration (for example, if method1 is declared before method2, method2s end declaration will be run before method1s), and for each method they are run in the order in which they are declared.
Note that this is not an object destructor, and no objects of a particular class may still exist when these methods are run.
ignoredefaults
The value corresponding to the ignoredefaults key is an array reference pointing to a list of strings. Each string must corespond to a valid key, and indicates that any in-force defaults for that key are to be ignored. See the section on the special --defaults method for details.
init
The value corresponding to the init key is identical in structure to that corresponding to the end key. The only difference is that the declared methods/code refs are executed as soon as the method is available, rather than during an END block.
once
The value corresponding to the once key is identical in structure to that corresponding to the end key. The values are used when the method is invoked, however.
If the method is invoked on an object based on a hash ref, or on the class itself, and it has not been invoked before on that object or hash ref, the methods and code refs declared by this key are executed one at a time, like this:
$obj->$codeval($name, $isscalar, $argsref[, @args ]);
where $obj is the object or class on which the method is being invoked, $codeval is the method name or code reference supplied, $name is the name of the method, $isscalar is a flag to specify if the declared method itself is being executed in a scalar context, $argsref is a reference to the method arguments (@_, in other words), and @args are any optional arguments in the declaration.
The return value of each method or code reference call is used as the new arguments array for successive iterations or the declared method itself (including the object or class name). Yes, that means that these functions can change the the object or class out from under successive operations.
Any method or code ref returning an empty list will cause further processing for the method to abort, and an empty list or undefined value (as appropriate for the context) will be returned as the declared methods return value.
package
The value coresponding to the package key is a string that determines where the declared method is created (which is the callers package by default, unless modified with a --defaults section). The string __CALLER__ can be used to specify the callers namespace, so constructions like the one in the synopsis can be used to create methods in a namespace based on the calling package namespace.
postcheck
The value coresponding to the postcheck key is identical in structure to that coresponding to the end key. The postcheck operations are run like this:
$obj->$codeval($name, $isscalar, $vref[, @args ]);
where $obj is the underlying object or class, $codeval is the method or code ref from the list, $name is the name of the declared method, $isscalar is the flag specifying if the declared method was called in a scalar context, $vref is an array reference of the currently to-be-returned values, and @args is the optional arguments from the list.
Each method or code reference is expected to return the value(s) it wishes to have returned from the method. Returning a null list does NOT stop processing of later postcheck declarations.
precheck
The precheck phase operates similarly to the once phase, except that its triggered on all method calls (even if the underlying object is not a hash reference or a class name).
Any illegal or unrecognized key will cause a warning, and processing of the affected hashref will stop. This means a --defaults section will be ineffective, or a declared method wont be created.
Download (0.008MB)
Added: 2006-10-18 License: Perl Artistic License Price:
1101 downloads
Daizu::File 0.3
Daizu::File is a Perl class representing files in working copies. more>>
Daizu::File is a Perl class representing files in working copies.
Each object of this class represents a particular file in a Daizu CMS working copy (a record in the wc_file table).
METHODS
Note that all the functions which return the value of a Subversion property will strip leading and trailing whitespace, and treat a value which is empty or entirely whitespace as if it wasnt set at all.
Daizu::File->new($cms, $file_id)
Return a new Daizu::File object for the file with the specified ID number.
$file->data
Return a reference to a string containing the file data (content).
$file->wc
Return a Daizu::Wc object representing the working copy in which this file lives.
$file->guid_uri
Return the GUID URI for this file.
$file->directory_path
Returns the path of a directory, either the same as the file if its a directory itself, or the path of its parent directory, or if its at the top level.
$file->permalink
Returns the first URL generated by the file, which will be the URL you want to link to most of the time. For articles this will always be the normal HTML version of the article, even if there are also other URLs available for it, and it will always be the first page of multipage articles. For non-article files there is no guarantee about what this will return, but most will only generate a single URL anyway, and for those that dont generators are likely to return the most linkable URL first.
The URL returned is an absolute URL provided as a URI object.
Returns nothing if the file doesnt generate any URLs.
There are some cases where this might not be what you want. For example, the root directory of a website using Daizu::Gen will either not generate a URL at all, or will generate one for a Google sitemap XML file, neither of which is likely to be useful for linking. To get the URL of the website you would probably need to find a file called something like _index.html. On the other hand, the Daizu::Gen::Blog generator will give you a sensible URL for the blog homepage if you call this on its root directory.
$file->urls_in_db($method, $argument)
Return a list of the URLs (plain strings, each an absolute URI) of the file which have the specified method and argument values, drawing from the url table in the database.
$file->article_urls
Return information about the URLs which the file should have, if it is an article. Fails if it isnt.
<<lessEach object of this class represents a particular file in a Daizu CMS working copy (a record in the wc_file table).
METHODS
Note that all the functions which return the value of a Subversion property will strip leading and trailing whitespace, and treat a value which is empty or entirely whitespace as if it wasnt set at all.
Daizu::File->new($cms, $file_id)
Return a new Daizu::File object for the file with the specified ID number.
$file->data
Return a reference to a string containing the file data (content).
$file->wc
Return a Daizu::Wc object representing the working copy in which this file lives.
$file->guid_uri
Return the GUID URI for this file.
$file->directory_path
Returns the path of a directory, either the same as the file if its a directory itself, or the path of its parent directory, or if its at the top level.
$file->permalink
Returns the first URL generated by the file, which will be the URL you want to link to most of the time. For articles this will always be the normal HTML version of the article, even if there are also other URLs available for it, and it will always be the first page of multipage articles. For non-article files there is no guarantee about what this will return, but most will only generate a single URL anyway, and for those that dont generators are likely to return the most linkable URL first.
The URL returned is an absolute URL provided as a URI object.
Returns nothing if the file doesnt generate any URLs.
There are some cases where this might not be what you want. For example, the root directory of a website using Daizu::Gen will either not generate a URL at all, or will generate one for a Google sitemap XML file, neither of which is likely to be useful for linking. To get the URL of the website you would probably need to find a file called something like _index.html. On the other hand, the Daizu::Gen::Blog generator will give you a sensible URL for the blog homepage if you call this on its root directory.
$file->urls_in_db($method, $argument)
Return a list of the URLs (plain strings, each an absolute URI) of the file which have the specified method and argument values, drawing from the url table in the database.
$file->article_urls
Return information about the URLs which the file should have, if it is an article. Fails if it isnt.
Download (0.41MB)
Added: 2006-11-29 License: Perl Artistic License Price:
1059 downloads
MP3::Tag::File 0.9708
MP3::Tag::File is a Perl module for reading / writing files. more>>
MP3::Tag::File is a Perl module for reading / writing files.
SYNOPSIS
my $mp3 = MP3::Tag->new($filename);
($title, $artist, $no, $album, $year) = $mp3->parse_filename();
see MP3::Tag
MP3::Tag::File is designed to be called from the MP3::Tag module.
It offers possibilities to read/write data from files via read(), write(), truncate(), seek(), tell(), open(), close(); one can find the filename via the filename() method.
parse_filename()
($title, $artist, $no, $album, $year) = $mp3->parse_filename($what, $filename);
parse_filename() tries to extract information about artist, title, track number, album and year from the filename. (For backward compatibility it may be also called by deprecated name read_filename().)
This is likely to fail for a lot of filenames, especially the album will be often wrongly guessed, as the name of the parent directory is taken as album name.
$what and $filename are optional. $what maybe title, track, artist, album or year. If $what is defined parse_filename() will return only this element.
If $filename is defined this filename will be used and not the real filename which was set by MP3::Tag with MP3::Tag-new($filename)>. Otherwise the actual filename is used (subject to configuration variable decode_encoding_filename).
Following formats will be hopefully recognized:
- album name/artist name - song name.mp3
- album_name/artist_name-song_name.mp3
- album.name/artist.name_song.name.mp3
- album name/(artist name) song name.mp3
- album name/01. artist name - song name.mp3
- album name/artist name - 01 - song.name.mp3
If artist or title end in (NUMBER) with 4-digit NUMBER, it is considered the year.
title()
$title = $mp3->title($filename);
Returns the title, guessed from the filename. See also parse_filename(). (For backward compatibility, can be called by deprecated name song().)
$filename is optional and will be used instead of the real filename if defined.
artist()
$artist = $mp3->artist($filename);
Returns the artist name, guessed from the filename. See also parse_filename()
$filename is optional and will be used instead of the real filename if defined.
track()
$track = $mp3->track($filename);
Returns the track number, guessed from the filename. See also parse_filename()
$filename is optional and will be used instead of the real filename if defined.
year()
$year = $mp3->year($filename);
Returns the year, guessed from the filename. See also parse_filename()
$filename is optional and will be used instead of the real filename if defined.
album()
$album = $mp3->album($filename);
Returns the album name, guessed from the filename. See also parse_filename() The album name is guessed from the parent directory, so it is very likely to fail.
$filename is optional and will be used instead of the real filename if defined.
comment()
$comment = $mp3->comment($filename); # Always undef
genre()
$genre = $mp3->genre($filename); # Always undef
<<lessSYNOPSIS
my $mp3 = MP3::Tag->new($filename);
($title, $artist, $no, $album, $year) = $mp3->parse_filename();
see MP3::Tag
MP3::Tag::File is designed to be called from the MP3::Tag module.
It offers possibilities to read/write data from files via read(), write(), truncate(), seek(), tell(), open(), close(); one can find the filename via the filename() method.
parse_filename()
($title, $artist, $no, $album, $year) = $mp3->parse_filename($what, $filename);
parse_filename() tries to extract information about artist, title, track number, album and year from the filename. (For backward compatibility it may be also called by deprecated name read_filename().)
This is likely to fail for a lot of filenames, especially the album will be often wrongly guessed, as the name of the parent directory is taken as album name.
$what and $filename are optional. $what maybe title, track, artist, album or year. If $what is defined parse_filename() will return only this element.
If $filename is defined this filename will be used and not the real filename which was set by MP3::Tag with MP3::Tag-new($filename)>. Otherwise the actual filename is used (subject to configuration variable decode_encoding_filename).
Following formats will be hopefully recognized:
- album name/artist name - song name.mp3
- album_name/artist_name-song_name.mp3
- album.name/artist.name_song.name.mp3
- album name/(artist name) song name.mp3
- album name/01. artist name - song name.mp3
- album name/artist name - 01 - song.name.mp3
If artist or title end in (NUMBER) with 4-digit NUMBER, it is considered the year.
title()
$title = $mp3->title($filename);
Returns the title, guessed from the filename. See also parse_filename(). (For backward compatibility, can be called by deprecated name song().)
$filename is optional and will be used instead of the real filename if defined.
artist()
$artist = $mp3->artist($filename);
Returns the artist name, guessed from the filename. See also parse_filename()
$filename is optional and will be used instead of the real filename if defined.
track()
$track = $mp3->track($filename);
Returns the track number, guessed from the filename. See also parse_filename()
$filename is optional and will be used instead of the real filename if defined.
year()
$year = $mp3->year($filename);
Returns the year, guessed from the filename. See also parse_filename()
$filename is optional and will be used instead of the real filename if defined.
album()
$album = $mp3->album($filename);
Returns the album name, guessed from the filename. See also parse_filename() The album name is guessed from the parent directory, so it is very likely to fail.
$filename is optional and will be used instead of the real filename if defined.
comment()
$comment = $mp3->comment($filename); # Always undef
genre()
$genre = $mp3->genre($filename); # Always undef
Download (0.17MB)
Added: 2006-11-08 License: Perl Artistic License Price:
1080 downloads
Periodic Calendar 2.0
Periodic Calendar is a GUI utility which assists in women menstrual cycles tracking and fertility periods prediction. more>>
Periodic Calendar is a GUI utility which assists in women menstrual cycles tracking and fertility periods prediction.
The information tracked by this application can be used either to became pregnant or to prevent pregnancy.
At this point the fertility prediction is based on the calendar method which is not very precise. It is not recommended to use this method alone for the birth control.
<<lessThe information tracked by this application can be used either to became pregnant or to prevent pregnancy.
At this point the fertility prediction is based on the calendar method which is not very precise. It is not recommended to use this method alone for the birth control.
Download (0.10MB)
Added: 2005-10-31 License: GPL (GNU General Public License) Price:
1457 downloads
Timestamp::Simple 1.01
Timestamp::Simple is a Perl module with simple methods for timestamping. more>>
Timestamp::Simple is a Perl module with simple methods for timestamping.
SYNOPSIS
use Timestamp::Simple qw(stamp);
print stamp, "n";
This module provides a simple method for returning a stamp to mark when an event occurs.
METHODS
stamp()
This method returns a timestamp in the form yyyymmddHHMMSS.
<<lessSYNOPSIS
use Timestamp::Simple qw(stamp);
print stamp, "n";
This module provides a simple method for returning a stamp to mark when an event occurs.
METHODS
stamp()
This method returns a timestamp in the form yyyymmddHHMMSS.
Download (0.010MB)
Added: 2007-04-27 License: Perl Artistic License Price:
912 downloads
VietIME 1.3
VietIME is a Java-based Vietnamese input method editor (IME). more>>
VietIME is a Java-based Vietnamese input method editor (IME). Enable input of Vietnamese Unicode text in Javas AWT and Swing text components.
VietIME uses the input method framework in the Java 2 platform (1.3 or higher) to enable the collaboration between text editing components and input methods in entering Vietnamese text with any Java runtime environment.
Text editing components that use the input method framework run on any Java application environment and support any text input methods available on that Java application environment without modifying or recompiling the text editing component.
Main features:
- Multi-platform
Windows
Solaris
Linux/Unix
Mac OS X
Others
- Unicode compatibility
- Common Vietnamese input methods
VNI
VIQR
Telex
- SmartMark
- Spell Check, Convert, Change Case, Strip/Normalize Diacritics, Sort Vietnamese words, etc. (available only to Swing applications)
<<lessVietIME uses the input method framework in the Java 2 platform (1.3 or higher) to enable the collaboration between text editing components and input methods in entering Vietnamese text with any Java runtime environment.
Text editing components that use the input method framework run on any Java application environment and support any text input methods available on that Java application environment without modifying or recompiling the text editing component.
Main features:
- Multi-platform
Windows
Solaris
Linux/Unix
Mac OS X
Others
- Unicode compatibility
- Common Vietnamese input methods
VNI
VIQR
Telex
- SmartMark
- Spell Check, Convert, Change Case, Strip/Normalize Diacritics, Sort Vietnamese words, etc. (available only to Swing applications)
Download (0.13MB)
Added: 2007-07-13 License: GPL (GNU General Public License) Price:
998 downloads
Smart Common Input Method platform 1.4.7
Smart Common Input Method platform is a development platform. more>>
Smart Common Input Method platform is a development platform that significantly reduces the difficulty of input method development.
SCIM splits input method into three parts: FrontEnd, which handles user interface and communication with client applications, Server, which handles the key event to string conversion work, and BackEnd, which manages all of the Servers.
Enhancements:
- The implementation of scim::Socket was improved for better error handling.
- A high power consumption issue caused by the X11 frontend was fixed.
<<lessSCIM splits input method into three parts: FrontEnd, which handles user interface and communication with client applications, Server, which handles the key event to string conversion work, and BackEnd, which manages all of the Servers.
Enhancements:
- The implementation of scim::Socket was improved for better error handling.
- A high power consumption issue caused by the X11 frontend was fixed.
Download (2.5MB)
Added: 2007-06-27 License: LGPL (GNU Lesser General Public License) Price:
852 downloads
File::stat 0.1
File::stat is a by-name interface to Perls built-in stat() functions. more>>
File::stat is a by-name interface to Perls built-in stat() functions.
SYNOPSIS
use File::stat;
$st = stat($file) or die "No $file: $!";
if ( ($st->mode & 0111) && $st->nlink > 1) ) {
print "$file is executable with lotsa linksn";
}
use File::stat qw(:FIELDS);
stat($file) or die "No $file: $!";
if ( ($st_mode & 0111) && $st_nlink > 1) ) {
print "$file is executable with lotsa linksn";
}
This modules default exports override the core stat() and lstat() functions, replacing them with versions that return "File::stat" objects. This object has methods that return the similarly named structure field name from the stat(2) function; namely, dev, ino, mode, nlink, uid, gid, rdev, size, atime, mtime, ctime, blksize, and blocks.
You may also import all the structure fields directly into your namespace as regular variables using the :FIELDS import tag. (Note that this still overrides your stat() and lstat() functions.) Access these fields as variables named with a preceding st_ in front their method names. Thus, $stat_obj->dev() corresponds to $st_dev if you import the fields.
To access this functionality without the core overrides, pass the use an empty import list, and then access function functions with their full qualified names. On the other hand, the built-ins are still available via the CORE:: pseudo-package.
<<lessSYNOPSIS
use File::stat;
$st = stat($file) or die "No $file: $!";
if ( ($st->mode & 0111) && $st->nlink > 1) ) {
print "$file is executable with lotsa linksn";
}
use File::stat qw(:FIELDS);
stat($file) or die "No $file: $!";
if ( ($st_mode & 0111) && $st_nlink > 1) ) {
print "$file is executable with lotsa linksn";
}
This modules default exports override the core stat() and lstat() functions, replacing them with versions that return "File::stat" objects. This object has methods that return the similarly named structure field name from the stat(2) function; namely, dev, ino, mode, nlink, uid, gid, rdev, size, atime, mtime, ctime, blksize, and blocks.
You may also import all the structure fields directly into your namespace as regular variables using the :FIELDS import tag. (Note that this still overrides your stat() and lstat() functions.) Access these fields as variables named with a preceding st_ in front their method names. Thus, $stat_obj->dev() corresponds to $st_dev if you import the fields.
To access this functionality without the core overrides, pass the use an empty import list, and then access function functions with their full qualified names. On the other hand, the built-ins are still available via the CORE:: pseudo-package.
Download (14.2MB)
Added: 2007-04-27 License: Perl Artistic License Price:
910 downloads
Nokia::File::NFB 0.01
Nokia::File::NFB is a Perl module to create, read and rrite Nokia nfb/nfc phone backup files. more>>
Nokia::File::NFB is a Perl module to create, read and write Nokia nfb/nfc phone backup files.
SYNOPSIS
use Nokia::File::NFB;
my $nfb = new Nokia::File::NFB;
## read in the file phone_backup.nfb.
$nfb->read(phone_backup.nfb);
## print out the phone model the backup file is of.
print "Phone model is ", $nfb->phone(), "n";
## change the phone model to PerlPhone.
$nfb->phone("PerlPhone");
## write out the file as new_phone_backup.nfb.
$nfb->write(new_phone_backup.nfb);
This is used to parse existing or create new files in Nokia NFB or NFC format. NFB is the format used by the Nokia PC Suite Backup and Restore software.
The most interesting part is probably the elements() method. This is used to return each internal file backed up in the NFB file as a Nokia::File::NFB::Element object. These are useful things such as photos, contacts and calendar files.
I dont actually know what the letters NFB or NFC actually stand for, but they are the suffixes used on the backup and copy file created by the Backup and Restore program.
<<lessSYNOPSIS
use Nokia::File::NFB;
my $nfb = new Nokia::File::NFB;
## read in the file phone_backup.nfb.
$nfb->read(phone_backup.nfb);
## print out the phone model the backup file is of.
print "Phone model is ", $nfb->phone(), "n";
## change the phone model to PerlPhone.
$nfb->phone("PerlPhone");
## write out the file as new_phone_backup.nfb.
$nfb->write(new_phone_backup.nfb);
This is used to parse existing or create new files in Nokia NFB or NFC format. NFB is the format used by the Nokia PC Suite Backup and Restore software.
The most interesting part is probably the elements() method. This is used to return each internal file backed up in the NFB file as a Nokia::File::NFB::Element object. These are useful things such as photos, contacts and calendar files.
I dont actually know what the letters NFB or NFC actually stand for, but they are the suffixes used on the backup and copy file created by the Backup and Restore program.
Download (0.007MB)
Added: 2007-05-24 License: Perl Artistic License Price:
917 downloads
File::Sync 0.09
File::Sync is a Perl access to fsync() and sync() function calls. more>>
File::Sync is a Perl access to fsync() and sync() function calls.
SYNOPSIS
use File::Sync qw(fsync sync);
fsync(*FILEHANDLE) or die "fsync: $!";
sync();
use File::Sync qw(fsync);
use IO::File;
$fh = IO::File->new("> /tmp/foo")
or die "new IO::File: $!";
...
fsync($fh) or die "fsync: $!";
The fsync() function takes a Perl file handle as its only argument, and passes its fileno() to the C function fsync(). It returns undef on failure, or true on success.
The fsync_fd() function is used internally by fsync(); it takes a file descriptor as its only argument.
The sync() function is identical to the C function sync().
This module does not export any methods by default, but fsync() is made available as a method of the FileHandle and IO::Handle classes.
<<lessSYNOPSIS
use File::Sync qw(fsync sync);
fsync(*FILEHANDLE) or die "fsync: $!";
sync();
use File::Sync qw(fsync);
use IO::File;
$fh = IO::File->new("> /tmp/foo")
or die "new IO::File: $!";
...
fsync($fh) or die "fsync: $!";
The fsync() function takes a Perl file handle as its only argument, and passes its fileno() to the C function fsync(). It returns undef on failure, or true on success.
The fsync_fd() function is used internally by fsync(); it takes a file descriptor as its only argument.
The sync() function is identical to the C function sync().
This module does not export any methods by default, but fsync() is made available as a method of the FileHandle and IO::Handle classes.
Download (0.004MB)
Added: 2006-06-29 License: Perl Artistic License Price:
1213 downloads
File::Size 0.06
File::Size is a Perl module to get the size of files and directories. more>>
SYNOPSIS
Get the size for directory /etc/ with the block size of 1024 while following symbolic links:
my $obj = File::Size->new(
dir => /etc/,
blocksize => 1024,
followsymlinks => 1,
humanreadable => 1
);
print $obj->getsize(), "n";
File::Size is used to get the size of files and directories.
There are 6 methods you can use:
new
There are 4 optional hash values for the new() method:
dir
The directory you want the module to get the size for it. Default is current working directory.
blocksize
The blocksize for the output of getsize() method. default is 1 (output in bytes).
followsymlinks
If you want to follow symlinks for directories and files, use this option. The default is not to follow symlinks.
humanreadable
If you want output size in human readable format (e.g. 2048 -> 2.0K), set this option to 1.
You dont have to specify any of those options, which means this is okay:
print File::Size->new()->getsize(), " bytesn";
This is okay too:
print File::Size->new()->setdir( /etc/ )->setblocksize( 1024**2 )->getsize(), " MBn";
setdir
Used to set (or get - if called without parameters) the directory. Example: $obj->setdir( /etc/ );
setblocksize
Used to set (or get - if called without parameters) the block size. Example: $obj->setblocksize( 1024 );
setfollowsymlinks
Used to set if you want to follow symbolic links or not. If called without parmeters, returns the current state. Example: $obj->setfollowsymlinks( 1 );
sethumanreadable
Used to set (or get - if called without parameters) if you want human-readable output sizes. Example: $obj->sethumanreadable( 1 );
getsize
Used to calculate the total size of the directory. Prints output according to the block size you did or didnt specify.
Download (0.003MB)
Added: 2007-04-30 License: Perl Artistic License Price:
907 downloads
File::Data 1.12
File::Data is a Perl module as a interface to file data. more>>
File::Data is a Perl module as a interface to file data.
Wraps all the accessing of a file into a convenient set of calls for reading and writing data, including a simple regex interface.
Note that the file needs to exist prior to using this module!
See new()
SYNOPSIS
use strict;
use File::Data;
my $o_dat = File::Data->new(./t/example);
$o_dat->write("complete file contentsn");
$o_dat->prepend("first linen"); # line 0
$o_dat->append("original second (last) linen");
$o_dat->insert(2, "new second linen"); # inc. zero!
$o_dat->replace(line, LINE);
print $o_dat->READ;
Or, perhaps more seriously :-}
my $o_sgm = File::Data->new(./sgmlfile);
print "new SGML data: ".$o_sgm->REPLACE(
s*((?s).*)s* ,
qq| key="val" |,
) if $o_sgm;
See METHODS and EXAMPLES.
IMPORTANT
lowercase method calls return the object itself, so you can chain calls.
my $o_obj = $o_dat->read; # ! READ; # !<<less
Wraps all the accessing of a file into a convenient set of calls for reading and writing data, including a simple regex interface.
Note that the file needs to exist prior to using this module!
See new()
SYNOPSIS
use strict;
use File::Data;
my $o_dat = File::Data->new(./t/example);
$o_dat->write("complete file contentsn");
$o_dat->prepend("first linen"); # line 0
$o_dat->append("original second (last) linen");
$o_dat->insert(2, "new second linen"); # inc. zero!
$o_dat->replace(line, LINE);
print $o_dat->READ;
Or, perhaps more seriously :-}
my $o_sgm = File::Data->new(./sgmlfile);
print "new SGML data: ".$o_sgm->REPLACE(
s*((?s).*)s* ,
qq| key="val" |,
) if $o_sgm;
See METHODS and EXAMPLES.
IMPORTANT
lowercase method calls return the object itself, so you can chain calls.
my $o_obj = $o_dat->read; # ! READ; # !<<less
Download (0.013MB)
Added: 2007-04-26 License: Perl Artistic License Price:
914 downloads
Audio::File::Type 0.10
Audio::File::Type represents an audio filetype. more>>
Audio::File::Type represents an audio filetype.
An instance of an object inherited from Audio::File::Type is returned by the constructor of Audio::File. This object currently provides access to the audio files information like its audio properties (bitrate, sample rate, number of channels, ...) and the data stored in the files tag, but also providing access to the raw audio data and other information should be easy to be implemented.
METHODS
new
Constructor. In fact you dont need to use it. Please use Audio::File which will call the appropriate constructor corresponding to the files type.
init
This method will be called by the constructor. Its empty by default and should be overwritten by inheriting subclasses to initialize themselfes.
name
Returns the name of the audio file.
is_readable
Checks whether the file is readable or not. At the moment its only used by the constructor, but it will be more usefull with later versions of Audio::File.
is_writeable
Checks whether the file is writeable or not. At the moment youll probably dont need to call this method, but itll be more usefull as soon as changing the audio file is implemented.
tag
Returns a reference to the files tag object. See the documentation of Audio::File::Tag to learn about what the tag object does.
audio_properties
Returns a reference to the files audio properties object. See the documentation of Audio::File::AudioProperties to get information about what the audio properties object does.
save
Saves the audio file. This is not yet implemented but it should remember me to do it at some time..
type
Returns the files type.
<<lessAn instance of an object inherited from Audio::File::Type is returned by the constructor of Audio::File. This object currently provides access to the audio files information like its audio properties (bitrate, sample rate, number of channels, ...) and the data stored in the files tag, but also providing access to the raw audio data and other information should be easy to be implemented.
METHODS
new
Constructor. In fact you dont need to use it. Please use Audio::File which will call the appropriate constructor corresponding to the files type.
init
This method will be called by the constructor. Its empty by default and should be overwritten by inheriting subclasses to initialize themselfes.
name
Returns the name of the audio file.
is_readable
Checks whether the file is readable or not. At the moment its only used by the constructor, but it will be more usefull with later versions of Audio::File.
is_writeable
Checks whether the file is writeable or not. At the moment youll probably dont need to call this method, but itll be more usefull as soon as changing the audio file is implemented.
tag
Returns a reference to the files tag object. See the documentation of Audio::File::Tag to learn about what the tag object does.
audio_properties
Returns a reference to the files audio properties object. See the documentation of Audio::File::AudioProperties to get information about what the audio properties object does.
save
Saves the audio file. This is not yet implemented but it should remember me to do it at some time..
type
Returns the files type.
Download (0.073MB)
Added: 2006-06-19 License: Perl Artistic License Price:
1222 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above method file search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed