From: Udo Spallek Date: Thu, 29 Mar 2007 16:52:59 +0000 (+0000) Subject: Skript zum Erzeugen eines tags-Files. Damit kann man im Editor direkt zu der Stelle... X-Git-Tag: release-2.4.3^2~551 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=61cd09fa923cc9d834cd8d7e2307e5b8bb994939;p=kivitendo-erp.git Skript zum Erzeugen eines tags-Files. Damit kann man im Editor direkt zu der Stelle im Code springen, wo die gesuchte Funktion definiert ist. Praktisch fuer vi, joe, emacs... --- diff --git a/scripts/create_tags_file.pl b/scripts/create_tags_file.pl new file mode 100644 index 000000000..712493b30 --- /dev/null +++ b/scripts/create_tags_file.pl @@ -0,0 +1,42 @@ +######################################################## +# +# This script creates a 'tags' file in the style of ctags +# out of the SL/ modules. +# Tags file is usable in some editors (vim, joe, emacs, ...). +# See your editors documentation for more information. +# +# (c) Udo Spallek, Aachen +# Licenced under GNU/GPL. +# +######################################################## + +use Perl::Tags; +use IO::Dir; +use Data::Dumper; + +use strict; +use warnings FATAL =>'all'; +use diagnostics; + +my $dir = IO::Dir->new("SL/"); + +my @files = grep {/\.pm$/} $dir->read(); + +@files = grep { s{^}{SL\/}gxms } @files; + +#print Dumper(@files); + +#__END__ +my $naive_tagger = Perl::Tags::Naive->new( max_level=>1 ); +$naive_tagger->process( + files => [@files], + refresh=>1 +); + +my $tagsfile="tags"; + +# of course, it may not even output, for example, if there's nothing new to process +$naive_tagger->output( outfile => $tagsfile ); + + +1; \ No newline at end of file