[1] . '" class="menu">' . $menu[$lcv]->[0] . ''; } ################################## # get_changelog ($file, $version) ################################## # This function retrieves only the specified version's logs from a # CHANGELOG file. # # I love regular expressions -- sorry if they confuse you, but they # really are the most efficient way to get the job done =) sub get_changelog { my $file = shift || ''; my $version = shift || ''; my $print = 0; my $ret = ''; # open file if (open(FIN, "<$file")) { # read file one line at a time while() { # unless I have hit the point at which to start printing (the requested version) unless ($print) { # if this line begins the requested version, start print mode if (($_ =~ /^\s*\/\*\s*(.*?)\s*\*\//) && ($1 eq $version)) { $print = 1; } # else (printing in progress) } else { # unless this line starts another version unless ($_ =~ /^\s*\/\*\s*.*?\s*\*\//) { # add line to the print list $ret .= $_; # else (this line DOES begin another version) } else { # end print mode $print = 0; } } } # close file close(FIN); } # replace HTML characters with their ordinal macros $ret =~ s/(["&<>])/'&#' . ord($1) . ';'/sge; # remove white space from the beginning and ending of the return string $ret =~ s/^\s*(.*?)\s*$/$1/s; # return the print string return $ret; } ########## # top_bar ########## sub top_bar { ?>
PTM Logo Version
  ', @menu) =?>
  ', @menu) =?>
This Site is 100%
Powered by PTM

SourceForge.net Logo
In short, PTM is a
Perl/HTML hybrid.
An inline develop-
ment language for
those that need a
bit more power
behind the
scenes.

But more than that,
it allows develop-
ers to harness
Perl's ability to
manipulate strings
of text and iterate
loops many times
faster than other
languages on the
market without
the need to sacri-
fice development
time to complex
print, split, and join
statements.

Additionally, PTM
wraps many vari-
ables common to
PHP to ease the
transition between
PTM and PHP when
switching back and
forth.

PTM was not
created to replace
PHP or ASP. It was
designed to be a
complement to
them. Where one
fails another picks
up the slack. In the
world of dynamic
design we need all
the tools in our
toolbox to get the
job done. PTM is
the raw power
tool you've been
missing.
PTM Inline Perl/HTML Hybrid Parser Project - SourceForge.Net
[qw( Index GNU_GPL Description Installation Language_Overview Tags Variables Functions Modules )], Installation => { _keys => [qw( UNIX Win32 )] }, Tags => { _keys => [qw( DO DISPLAY FILE NOHTML PREPROCESS REQUIRE TEMPLATE )] }, Variables => { _keys => [qw( $_BASE $_CGI %_COOKIES $_DEFAULT_PTM_FILE $_DOCUMENT_ROOT %_GET $_HEADER @_KEYWORDS $_PATH %_POST @_PTM $_PTM_POS $_PTM_PREPROCESS @_REQUIRE $_SCRIPT %_SERVER %_SESSION %_SET_COOKIES $_SYNTAX_... $_URL $_USE_SECURE_SCRIPT_PASSING $_VERSION )] }, Functions => { _keys => [qw( _PTM() _PTM_FILE() append_file_text() basic_header() delete_cookie() end_session() get_dir_list() get_file_text() is_secure() is_session() nohtml() redirect_header() session_add() session_delete() session_domain() session_id() session_name() session_path() session_secure() set_basic_header() set_cookie() set_redirect_header() start_session() update_session() write_file_text() )] }, Modules => { _keys => [qw( PTMDB RSS20 )], PTMDB => { _keys => [qw( db_add_row() db_add_row_hash() db_create_database() db_create_table() db_connect() db_disconnect() db_delete_row() db_delete_row_like() db_delete_row_where() db_drop_database() db_drop_table() db_get_column_count() db_get_column_stats() db_get_columns() db_get_databases() db_get_index_stats() db_get_indexes() db_get_process_stats() db_get_row() db_get_row_count() db_get_row_count_like() db_get_row_count_where() db_get_row_hash() db_get_row_hash_like() db_get_row_hash_where() db_get_row_hashes() db_get_row_hashes_like() db_get_row_hashes_where() db_get_row_like() db_get_row_where() db_get_rows() db_get_rows_like() db_get_rows_where() db_get_table_stats() db_get_tables() db_select_database() db_query() db_update_row() db_update_row_hash() db_update_row_hash_like() db_update_row_hash_where() db_update_row_like() db_update_row_where() )] }, RSS20 => { _keys => [qw( RSS20 RSS20NODE )], RSS20 => { _keys => [qw( _make_hash() fetch() file() hash() new() node() open() openfetch() parse() print() rss() url() )] }, RSS20NODE => { _keys => [qw( new() node() ref() )] } } } }; my @roman = qw(I II III IV V VI VII VIII IX X XI XII XIII XIV XV XVI XVII XVIII XIX XX); unshift(@roman, ''); my $lcv = 0; my $key = ''; my $key2 = ''; my $key3 = ''; my $key4 = ''; my $file = ''; my $file2 = ''; my $file3 = ''; my $file4 = ''; my $display = ''; &side_bar_header('Documentation'); ?>
{_keys}}) { $file = $key; $file =~ s/(.)/\l$1/sg; $file =~ s/[\$\@\%]//sg; $file =~ s/^_+//s; $file =~ s/\.//sg; $file =~ s/\(\)//sg; $display = $key; $display =~ s/^\s*//s; $display =~ s/\s*$//s; $display =~ s/_+/ /sg if (($display !~ /[\$\@\%]/s) && ($display !~ /\(\)/s)); ?> {$key})) { foreach $key2 (@{$docs->{$key}->{_keys}}) { $file2 = $key2; $file2 =~ s/(.)/\l$1/sg; $file2 =~ s/[\$\@\%]//sg; $file2 =~ s/^_+//s; $file2 =~ s/\.//sg; $file2 =~ s/\(\)//sg; $file2 = $file . '_' . $file2; $display = $key2; $display =~ s/^\s*//s; $display =~ s/\s*$//s; $display =~ s/_+/ /sg if (($display !~ /[\$\@\%]/s) && ($display !~ /\(\)/s)); ?> {$key}->{$key2})) { foreach $key3 (@{$docs->{$key}->{$key2}->{_keys}}) { $file3 = $key3; $file3 =~ s/(.)/\l$1/sg; $file3 =~ s/[\$\@\%]//sg; $file3 =~ s/^_+//s; $file3 =~ s/\.//sg; $file3 =~ s/\(\)//sg; $file3 = $file2 . '_' . $file3; $display = $key3; $display =~ s/^\s*//s; $display =~ s/\s*$//s; $display =~ s/_+/ /sg if (($display !~ /[\$\@\%]/s) && ($display !~ /\(\)/s)); ?> {$key}->{$key2}->{$key3})) { foreach $key4 (@{$docs->{$key}->{$key2}->{$key3}->{_keys}}) { $file4 = $key4; $file4 =~ s/(.)/\l$1/sg; $file4 =~ s/[\$\@\%]//sg; $file4 =~ s/^_+//s; $file4 =~ s/\.//sg; $file4 =~ s/\(\)//sg; $file4 = $file3 . '_' . $file4; $display = $key4; $display =~ s/^\s*//s; $display =~ s/\s*$//s; $display =~ s/_+/ /sg if (($display !~ /[\$\@\%]/s) && ($display !~ /\(\)/s)); ?>
   ">
  ">
      • ">
          • ">