MozRepl::Plugin::Restart - Restart Firefox/Thunderbird
version 0.02
use MozRepl; my $repl = MozRepl->new; $repl->setup({ plugins => { plugins => [qw/Restart/] } }); $repl->restart; ### and restart your Firefox or Thunderbird
Add restart() method to MozRepl.
In the MDC Code snippets:Miscellaneous(http://developer.mozilla.org/en/docs/Code_snippets:Miscellaneous#Restarting_Firefox.2FThunderbird)
var nsIAppStartup = Components.interfaces.nsIAppStartup; Components.classes["@mozilla.org/toolkit/app-startup;1"].getService(nsIAppStartup).quit(nsIAppStartup.eForceQuit | nsIAppStartup.eRestart);
MozRepl object (default "repl") has attribute "Ci" and "Cc". "Ci" is alias Components.interfaces, "Cc" is alias Components.classes. So restart script will be here,
(function(repl) { var nsIAppStartup = repl.Ci.nsIAppStartup; repl.Cc["@mozilla.org/toolkit/app-startup;1"].getService(nsIAppStartup).quit(nsIAppStartup.eForceQuit | nsIAppStartup.eRestart); })(window.repl);
Context object. See MozRepl.
Hash reference.
Toru Yamaguchi, <zigorou@cpan.org>
<zigorou@cpan.org>
Please report any bugs or feature requests to bug-mozrepl-plugin-restart@rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-mozrepl-plugin-restart@rt.cpan.org
Copyright 2007 Toru Yamaguchi, 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 MozRepl::Plugin::Restart, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MozRepl::Plugin::Restart
CPAN shell
perl -MCPAN -e shell install MozRepl::Plugin::Restart
For more information on module installation, please visit the detailed CPAN module installation guide.