Mozilla::ProfilesIni - Manipulation of Mozilla profiles.ini files
$path = Mozilla::ProfilesIni::_find_profile_path( home => $ENV{HOME}, type => "firefox" ); $ini = Mozilla::ProfilesIni->( path => $path );
This module provides routines for parsing and manipulating Mozilla profiles.ini files.
The following methods are implemented:
$ini = Mozilla::ProfilesIni->new( $path ); $ini = Mozilla::ProfilesIni->new( path => $path, %options );
The following options are supported:
Path to where the profiles.ini file is (excluding the actual profiles.ini file). This is a required option.
A Log::Dispatch object for receiving log messages.
Sets an internal debug flag. (Not implemented at this time.)
Create a new profile.ini file in "path".
$ini->create_profile( name => $name, is_default => $def, path => $path ); $ini->create_profile( $name, $def, $path );
Creates a profile named $name in $path. If $path is not specified, it creates a relative profile in the Profiles subdirectory below the profiles.ini file.
$name
$path
$path = $ini->ini_file();
Returns the path to the profiles.ini file.
@names = $ini->profile_names($type);
Returns the names of profiles associated with the type.
if ($ini->profile_exists($name)) { ... }
Returns true if a profile exists.
if ($ini->profile_is_relative($name)) { ... }
Returns the "IsRelative" flag for the profile.
$path = $ini->profile_path($name);
Returns the pathname of the profile.
if ($ini->profile_is_default($name)) { ... }
Returns the "Default" flag for the profile.
$section = $ini->profile_id($name);
Returns the "ini_file" identifier of the profile.
if ($ini->profile_is_locked($name)) { ... }
Returns true if there is a lock file in the profile.
$path = _find_profile_path( home => $home, type => $type ); $path = _find_profile_path( $home, $type );
Looks for a directory corresponding to where profile type of $type should be, generally somewhere in the $home directory, where $home is the platform-specific "home" directory (not necessarily $ENV{HOME}).
$type
$home
$ENV{HOME}
Returns undef if no path for that type was found.
undef
In cases where profile paths cannot be found, use the MOZILLA_HOME or appname_HOME environment variable to indicate where it is.
MOZILLA_HOME
appname_HOME
This module is a prototype. Use at your own risk!
Mozilla::Backup
Robert Rothenberg <rrwo at cpan.org>
Copyright (c) 2005 Robert Rothenberg. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Mozilla::Backup, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mozilla::Backup
CPAN shell
perl -MCPAN -e shell install Mozilla::Backup
For more information on module installation, please visit the detailed CPAN module installation guide.