Source

Kephra / lib / Kephra.pm

# See end of file for docs
use v5.6;
use strict;
use warnings;


package Kephra;
our $NAME     = __PACKAGE__;    # name of entire application
our $VERSION  = '0.4.5.7';      # version of ..

our @external_dependencies = (
	qw/Benchmark Encode Encode::Guess Cwd/,
	qw/File::Find File::Spec File::UserConfig Config::General YAML/,
	qw/PPI Moo/,
	qw/Wx Wx::STC Wx::Perl::ProcessStream/, # Wx::Scintilla Wx::STC
);
our @used_wx_modules = qw/Wx::AUI Wx::DND Wx::RichText/; # Wx::STC Wx::HTML

our @needed_at_first = qw/App API/;
our @starttime_loaded_modules = qw/
	App App::Util API Config Config::Default Config::File
	Document DocumentStash CommandList Edit EventTable 
	File KeyMap PluginRegistrar SanddrumInterpreter Works/;
our @runtime_loaded_namespaces =
	qw/App::Dialog Config::Default/;

our @command_modules = 
	qw/App App::Panel::Editor App::Panel::FileBrowser App::Panel::IOUnit
	App::Panel::OrgPad App::Panel::ProjectManager App::Panel::SratchSheet
	App::Panel::TextLab App::Panel::TreeLib
	CommandList Config 
	Edit File EventTable KeyMap PluginRegistrar SanddrumInterpreter/;
our @oop_interfaces = 
	qw/App::Editor App::Panel App::Splitter App::SidePanelController 
	   App::Bar::Document Document/;

sub start {
	start_worker_thread();
	load_libs();
	#configdir();
	Kephra::App->new()->MainLoop();
}

sub load_libs {
	my $pkg = __PACKAGE__;
	eval 'require ' . $_ for @external_dependencies, @used_wx_modules;
	require Kephra::App;
	#$require_string .= $pkg . '::'; eval $require_string . $_ for @needed_at_first;
}


sub start_worker_thread {
	#TODO:  
	#Kephra::Works
}

sub configdir {
	$_[0] and $_[0] eq $NAME and shift;
	#print File::UserConfig->configdir(@_);
}

sub debug {
	#Wx->import( ':everything' );
}

1;

__END__

=head1 NAME

Kephra - fresh and beautiful text editor that works as you prefer

=head1 SYNOPSIS

just start it with some files already open

    kephra file.name file name ....

=head1 User Documentation



=head1 INTERNALS

just follow L<Kephra::API>.

=head1 AUTHOR

Herbert Breunung, C<< <lichtkind at cpan.org> >>

=head1 BUGS

Please report any bugs or feature requests to C<bug-kephra at rt.cpan.org>, or through
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Kephra>.  I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.


=head1 SUPPORT

You can find documentation for this module with the perldoc command.

	perldoc Kephra

You can also look for information at:

=over 2

=item * HG Source Archive

L<https://bitbucket.org/lichtkind/kephra>

=item * Homepage

L<https://http://kephra.sourceforge.net>

=item * RT: CPAN's request tracker (report bugs here)

L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Kephra>

=item * AnnoCPAN: Annotated CPAN documentation

L<http://annocpan.org/dist/Kephra>

=item * CPAN Ratings

L<http://cpanratings.perl.org/d/Kephra>

=item * Search CPAN

L<http://search.cpan.org/dist/Kephra/>

=back


=head1 ACKNOWLEDGEMENTS

=over 2

=item * Herbert Breunung E<lt>lichtkind@cpan.orgE<gt> (main author and design lead)

=back

=head1 LICENSE AND COPYRIGHT

Copyright 2011 Herbert Breunung.

This program is released under the license: gpl v2

=cut
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.