
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:
$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.
$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}).
Returns undef if no path for that type was found.
In cases where profile paths cannot be found, use the MOZILLA_HOME or appname_HOME environment variable to indicate where it is.

This module is a prototype. Use at your own risk!


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.