App-PerlTidy-Tk
view release on metacpan or search on metacpan
lib/App/PerlTidy/Tk.pm view on Meta::CPAN
<body>
Version: $VERSION<br>
<a href="https://metacpan.org/pod/Tk">Perl Tk</a>: $Tk::VERSION<br>
<a href="https://metacpan.org/pod/Perl::Tidy">Perl::Tidy</a>: $Perl::Tidy::VERSION<br>
Perl $]<br>
<p>
Create by Gabor Szabo<br>
Source code on <a href="https://github.com/szabgab/App-PerlTidy-Tk">GitHub</a><br>
Thanks to my <a href="https://www.patreon.com/szabgab">Patreon</a> supporters<br>
<h2>Supporters</h2>
<ul>
<li><a href="https://www.activestate.com/">ActiveState</a></li>
<li><a href="https://www.chatterjee.net/">Anirvan Chatterjee</a></li>
<li>Brian Gaboury</li>
<li><a href="https://www.linkedin.com/in/chan-wilson-b867b3/">Chan Wilson</a></li>
<li><a href="https://www.linkedin.com/in/fins0ck/">Csaba Gaspar</a></li>
<li><a href="https://www.linkedin.com/in/dihnen/">David Ihnen</a></li>
<li><a href="https://www.preshweb.co.uk/about/">David Precious</a></li>
<li>Frank Kropp</li>
<li>John Andersen</li>
<li>Magnus Enger</li>
<li><a href="https://www.linkedin.com/in/mjgardner/">Mark Gardner</a></li>
<li>Markus Hechenberger</li>
<li>Matthew Mitchell</li>
<li>Matthew Persico</li>
<li>Meir Guttman</li>
<li>Mike Small</li>
<li><a href="https://www.linkedin.com/in/n8dgr8/">Nathan Schlehlein</a></li>
<li><a href="https://www.linkedin.com/in/pfmabry/">Paul Mabry</a></li>
<li><a href="https://perl.careers/">Perl Careers</a></li>
<li>Richard Leach</li>
<li>Robert Coursen</li>
<li><a href="https://www.linkedin.com/in/shajiindia/">Shaji Kalidasan</a></li>
<li><a href="https://www.linkedin.com/in/shanta-mcbain-7b644437/">Shanta McBain</a></li>
<li><a href="https://www.linkedin.com/in/slobodanmiskovic/">Slobodan MiÅ¡koviÄ</a></li>
<li><a href="https://www.linkedin.com/in/stephen-jarjoura-a684401/">Stephen A. Jarjoura</a></li>
<li>Tony Edwardson</li>
<li><a href="https://www.linkedin.com/in/tori-hunter-00009639/">Tori Hunter</a></li>
<li><a href="https://bruck.co.il/">Uri Bruck</a></li>
<li>Victor Moral</li>
<li>Wolfgang Odendahl</li>
<li>Yes2Crypto</li>
<li>... + many others</li>
</ul>
</body>
</html>
});
$dialog->Show;
}
sub onResource {
my ($html, %info) = @_;
my $url = $info{href};
#print $url, "\n";
#open_browser($url); # https://rt.cpan.org/Public/Bug/Display.html?id=133315
#print "done\n";
my $cmd = open_browser_cmd($url);
# TODO: verify that the URL is well formatted before passing it to system
if ($^O eq 'MSWin32') {
system("$cmd $url");
} else {
system("$cmd $url &");
}
}
sub exit_app {
my ($self) = @_;
# Save current window size so we can start the same size next time.
my %config = (
'geometry' => $self->{top}->geometry,
);
path($config_file)->spew(encode_json(\%config));
print("TODO: save changes before exit? Same when user click on x\n");
exit;
}
1;
=head1 NAME
App::PerlTidy::Tk - Tk based GUI to experiment with PerlTidy configuration options
=head1 SYNOPSIS
perltidy-tk
perltidy-tk --perl path/to/some.pl
=head1 DESCRIPTION
This is a GUI program. There are some videos on L<Perl Maven Tk|https://perlmaven.com/tk> explaining
how does this work and how was this built.
When the application exits we save the current window size in the config file and next time we use that size to open the application.
~/.perltidy-tk.json
=head1 SEE ALSO
L<Perl::Tidy>
L<Tk>
L<Tk::HyperText>
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2020 by L<Gabor Szabo|https://szabgab.com/>
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.26.1 or,
at your option, any later version of Perl 5 you may have available.
=cut
( run in 0.942 second using v1.01-cache-2.11-cpan-ceb78f64989 )