PageRenderTime 42ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/Kephra.pm

https://bitbucket.org/mishin/kephra
Perl | 150 lines | 100 code | 44 blank | 6 comment | 2 complexity | 198a1f22660e4c2d6a6a4f01cc107abd MD5 | raw file
Possible License(s): GPL-2.0
  1. # See end of file for docs
  2. use v5.6;
  3. use strict;
  4. use warnings;
  5. package Kephra;
  6. our $NAME = __PACKAGE__; # name of entire application
  7. our $VERSION = '0.4.5.6'; # version of ..
  8. our @external_dependencies = (
  9. qw/Benchmark Encode Encode::Guess Cwd/,
  10. qw/File::Find File::Spec File::UserConfig Config::General YAML/,
  11. qw/PPI Moo/,
  12. qw/Wx Wx::Scintilla Wx::Perl::ProcessStream/, # Wx::Scintilla Wx::STC
  13. );
  14. our @used_wx_modules = qw/Wx::AUI Wx::DND Wx::RichText/; # Wx::STC Wx::HTML
  15. our @needed_at_first = qw/App API/;
  16. our @starttime_loaded_modules = qw/
  17. App App::Util API Config Config::Default Config::File
  18. Document DocumentStash CommandList Edit EventTable
  19. File PluginRegistrar SanddrumInterpreter Works/;
  20. our @runtime_loaded_namespaces =
  21. qw/App::Dialog Config::Default/;
  22. our @command_modules =
  23. qw/App App::Panel::Editor App::Panel::FileBrowser App::Panel::IOUnit
  24. App::Panel::OrgPad App::Panel::ProjectManager App::Panel::SratchSheet
  25. App::Panel::TextLab App::Panel::TreeLib
  26. CommandList Config
  27. Edit File EventTable PluginRegistrar SanddrumInterpreter/;
  28. our @oop_interfaces =
  29. qw/App::Editor App::Panel App::Splitter App::Bar::Document Document/;
  30. sub start {
  31. start_worker_thread();
  32. load_libs();
  33. #configdir();
  34. Kephra::App->new()->MainLoop();
  35. }
  36. sub load_libs {
  37. my $pkg = __PACKAGE__;
  38. my $require_string = 'require ';
  39. eval $require_string . $_ for @external_dependencies, @used_wx_modules;
  40. $require_string .= $pkg . '::';
  41. eval $require_string . $_ for @needed_at_first;
  42. }
  43. sub start_worker_thread {
  44. #TODO:
  45. #Kephra::Works
  46. }
  47. sub configdir {
  48. $_[0] and $_[0] eq $NAME and shift;
  49. #print File::UserConfig->configdir(@_);
  50. }
  51. sub debug {
  52. #Wx->import( ':everything' );
  53. }
  54. 1;
  55. __END__
  56. =head1 NAME
  57. Kephra - fresh and beautiful text editor that works as you prefer
  58. =head1 SYNOPSIS
  59. just start it with some files already open
  60. kephra file.name file name ....
  61. =head1 User Documentation
  62. =head1 INTERNALS
  63. just follow L<Kephra::API>.
  64. =head1 AUTHOR
  65. Herbert Breunung, C<< <lichtkind at cpan.org> >>
  66. =head1 BUGS
  67. Please report any bugs or feature requests to C<bug-kephra at rt.cpan.org>, or through
  68. the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Kephra>. I will be notified, and then you'll
  69. automatically be notified of progress on your bug as I make changes.
  70. =head1 SUPPORT
  71. You can find documentation for this module with the perldoc command.
  72. perldoc Kephra
  73. You can also look for information at:
  74. =over 2
  75. =item * HG Source Archive
  76. L<https://bitbucket.org/lichtkind/kephra>
  77. =item * Homepage
  78. L<https://http://kephra.sourceforge.net>
  79. =item * RT: CPAN's request tracker (report bugs here)
  80. L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Kephra>
  81. =item * AnnoCPAN: Annotated CPAN documentation
  82. L<http://annocpan.org/dist/Kephra>
  83. =item * CPAN Ratings
  84. L<http://cpanratings.perl.org/d/Kephra>
  85. =item * Search CPAN
  86. L<http://search.cpan.org/dist/Kephra/>
  87. =back
  88. =head1 ACKNOWLEDGEMENTS
  89. =over 2
  90. =item * Herbert Breunung E<lt>lichtkind@cpan.orgE<gt> (main author and design lead)
  91. =back
  92. =head1 LICENSE AND COPYRIGHT
  93. Copyright 2011 Herbert Breunung.
  94. This program is released under the following license: gpl v2
  95. =cut