Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Mozilla::ProfilesIni
Manipulation of Mozilla F<profiles.ini> files

Mozilla::ProfilesIni - Manipulation of Mozilla F<profiles.ini> files


NAME

Mozilla::ProfilesIni - Manipulation of Mozilla profiles.ini files


SYNOPSIS


  $path = Mozilla::ProfilesIni::_find_profile_path(

    home => $ENV{HOME}, 

    type => "firefox"

  );

  $ini = Mozilla::ProfilesIni->( path => $path );



=head1 DESCRIPTION

This module provides routines for parsing and manipulating Mozilla profiles.ini files.

The following methods are implemented:

new

  $ini = Mozilla::ProfilesIni->new( $path );

  $ini = Mozilla::ProfilesIni->new( path => $path, %options );

The following options are supported:

path
Path to where the profiles.ini file is (excluding the actual profiles.ini file). This is a required option.

log
A the Log::Dispatch manpage object for receiving log messages.

debug
Sets an internal debug flag. (Not implemented at this time.)

create
Create a new profile.ini file in path.

create_profile

  $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.

ini_file

   $path = $ini->ini_file();

Returns the path to the profiles.ini file.

profile_names

  @names = $ini->profile_names($type);

Returns the names of profiles associated with the type.

profile_exists

  if ($ini->profile_exists($name)) { ... }

Returns true if a profile exists.

profile_is_relative

  if ($ini->profile_is_relative($name)) { ... }

Returns the ``IsRelative'' flag for the profile.

profile_path

  $path = $ini->profile_path($name);

Returns the pathname of the profile.

profile_is_default

  if ($ini->profile_is_default($name)) { ... }

Returns the ``Default'' flag for the profile.

profile_id

  $section = $ini->profile_id($name);

Returns the ini_file identifier of the profile.

profile_is_locked

  if ($ini->profile_is_locked($name)) { ... }

Returns true if there is a lock file in the profile.

_find_profile_path

  $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.


CAVEATS

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


SEE ALSO

the Mozilla::Backup manpage


AUTHOR

Robert Rothenberg <rrwo at cpan.org>


LICENSE

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.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy