Padre-Plugin-Perl6

 view release on metacpan or  search on metacpan

lib/Padre/Plugin/Perl6/Colorizer.pm  view on Meta::CPAN


		my $timer_id = Wx::NewId();
		my $main     = Padre->ide->wx->main;
		$COLORIZE_TIMER = Wx::Timer->new( $main, $timer_id );
		Wx::Event::EVT_TIMER(
			$main,
			$timer_id,
			sub {
				my $text = $doc->text_with_one_nl or return;

				# temporary overlay using the parse tree given by parrot
				# Create a coloring task
				my $module = $colorizer eq 'STD'
					? 'Padre::Plugin::Perl6::StdColorizerTask'       # STD
					: 'Padre::Plugin::Perl6::Perl6PgeColorizerTask'; # PGE
				eval "use $module";
				my $task = $module->new(
					text => $text,
				);

				# hand off to the task manager



( run in 0.952 second using v1.01-cache-2.11-cpan-49f99fa48dc )