.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Firefox::Marionette::Profile 3pm" .TH Firefox::Marionette::Profile 3pm 2024-05-15 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Firefox::Marionette::Profile \- Represents a prefs.js Firefox Profile .SH VERSION .IX Header "VERSION" Version 1.57 .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 2 \& use Firefox::Marionette(); \& use v5.10; \& \& my $profile = Firefox::Marionette::Profile\->new(); \& \& $profile\->set_value(\*(Aqbrowser.startup.homepage\*(Aq, \*(Aqhttps://duckduckgo.com\*(Aq); \& \& my $firefox = Firefox::Marionette\->new(profile => $profile); \& \& $firefox\->quit(); \& \& foreach my $profile_name (Firefox::Marionette::Profile\->names()) { \& # start firefox using a specific existing profile \& $firefox = Firefox::Marionette\->new(profile_name => $profile_name); \& $firefox\->quit(); \& \& # OR start a new browser with a copy of a specific existing profile \& \& $profile = Firefox::Marionette::Profile\->existing($profile_name); \& $firefox = Firefox::Marionette\->new(profile => $profile); \& $firefox\->quit(); \& } .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This module handles the implementation of a \f(CW\*(C`prefs.js\*(C'\fR Firefox Profile .SH CONSTANTS .IX Header "CONSTANTS" .SS ANY_PORT .IX Subsection "ANY_PORT" returns the port number for Firefox to listen on any port (0). .SH SUBROUTINES/METHODS .IX Header "SUBROUTINES/METHODS" .SS new .IX Subsection "new" returns a new profile. .SS names .IX Subsection "names" returns a list of existing profile names that this module can discover on the filesystem. .SS default_name .IX Subsection "default_name" returns the default profile name. .SS directory .IX Subsection "directory" accepts a profile name and returns the directory path that contains the \f(CW\*(C`prefs.js\*(C'\fR file. .SS download_directory .IX Subsection "download_directory" accepts a directory path that will contain downloaded files. Returns the previous value for download directory. .SS existing .IX Subsection "existing" accepts a profile name and returns a profile object for that specified profile name. .SS parse .IX Subsection "parse" accepts a path as the parameter. This path should be to a \f(CW\*(C`prefs.js\*(C'\fR file. Parses the file and returns it as a profile. .SS parse_by_handle .IX Subsection "parse_by_handle" accepts a filehandle as the parameter to a \f(CW\*(C`prefs.js\*(C'\fR file. Parses the file and returns it as a profile. .SS path .IX Subsection "path" accepts a profile name and returns the corresponding path to the \f(CW\*(C`prefs.js\*(C'\fR file. .SS profile_ini_directory .IX Subsection "profile_ini_directory" returns the base directory for profiles. .SS save .IX Subsection "save" accepts a path as the parameter. Saves the current profile to this location. .SS as_string .IX Subsection "as_string" returns the contents of current profile as a string. .SS get_value .IX Subsection "get_value" accepts a key name (such as \f(CW\*(C`browser.startup.homepage\*(C'\fR) and returns the value of the key from the profile. .SS set_value .IX Subsection "set_value" accepts a key name (such as \f(CW\*(C`browser.startup.homepage\*(C'\fR) and a value (such as \f(CW\*(C`https://duckduckgo.com\*(C'\fR) and sets this value in the profile. It returns itself to aid in chaining methods .SS clear_value .IX Subsection "clear_value" accepts a key name (such as \f(CW\*(C`browser.startup.homepage\*(C'\fR) and removes the key from the profile. It returns the old value of the key (if any). .SH DIAGNOSTICS .IX Header "DIAGNOSTICS" .ie n .IP """Failed to execute getpwuid for %s:%s""" 4 .el .IP "\f(CWFailed to execute getpwuid for %s:%s\fR" 4 .IX Item "Failed to execute getpwuid for %s:%s" The module was unable to to execute "getpwuid" in perlfunc. This is probably a bug in this module's logic. Please report as described in the BUGS AND LIMITATIONS section below. .ie n .IP """Failed to open \*(Aq%s\*(Aq for writing:%s""" 4 .el .IP "\f(CWFailed to open \*(Aq%s\*(Aq for writing:%s\fR" 4 .IX Item "Failed to open %s for writing:%s" The module was unable to open the named file. Maybe your disk is full or the file permissions need to be changed? .ie n .IP """Failed to write to \*(Aq%s\*(Aq:%s""" 4 .el .IP "\f(CWFailed to write to \*(Aq%s\*(Aq:%s\fR" 4 .IX Item "Failed to write to %s:%s" The module was unable to write to the named file. Maybe your disk is full? .ie n .IP """Failed to close \*(Aq%s\*(Aq:%s""" 4 .el .IP "\f(CWFailed to close \*(Aq%s\*(Aq:%s\fR" 4 .IX Item "Failed to close %s:%s" The module was unable to close a handle to the named file. Something is seriously wrong with your environment. .ie n .IP """Failed to rename \*(Aq%s\*(Aq to \*(Aq%s\*(Aq:%s""" 4 .el .IP "\f(CWFailed to rename \*(Aq%s\*(Aq to \*(Aq%s\*(Aq:%s\fR" 4 .IX Item "Failed to rename %s to %s:%s" The module was unable to rename the named file to the second file. Something is seriously wrong with your environment. .ie n .IP """Failed to open \*(Aq%s\*(Aq for reading:%s""" 4 .el .IP "\f(CWFailed to open \*(Aq%s\*(Aq for reading:%s\fR" 4 .IX Item "Failed to open %s for reading:%s" The module was unable to open the named file. Maybe your disk is full or the file permissions need to be changed? .ie n .IP """Failed to parse line \*(Aq%s\*(Aq""" 4 .el .IP "\f(CWFailed to parse line \*(Aq%s\*(Aq\fR" 4 .IX Item "Failed to parse line %s" The module was unable to parse the line for a Firefox prefs.js configuration. This is probably a bug in this module's logic. Please report as described in the BUGS AND LIMITATIONS section below. .SH "CONFIGURATION AND ENVIRONMENT" .IX Header "CONFIGURATION AND ENVIRONMENT" Firefox::Marionette::Profile requires no configuration files or environment variables. .SH DEPENDENCIES .IX Header "DEPENDENCIES" Firefox::Marionette::Profile requires the following non-core Perl modules .IP \(bu 4 Config::INI::Reader .SH INCOMPATIBILITIES .IX Header "INCOMPATIBILITIES" None reported. .SH "BUGS AND LIMITATIONS" .IX Header "BUGS AND LIMITATIONS" To report a bug, or view the current list of bugs, please visit .SH AUTHOR .IX Header "AUTHOR" David Dick \f(CW\*(C`\*(C'\fR .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" Copyright (c) 2024, David Dick \f(CW\*(C`\*(C'\fR. All rights reserved. .PP This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See "perlartistic" in perlartistic. .SH "DISCLAIMER OF WARRANTY" .IX Header "DISCLAIMER OF WARRANTY" BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. .PP IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.