# Examples page for IkiWiki::Plugin::syntax

This page contains examples of syntax highlight using the IkiWiki::Plugin::syntax and several configuration and programming source files.

Source fragment.html using Simple engine

        URL from  to examples/sources/fragment.html

        1  <?xml version="1.0" encoding="UTF-8"?>
        2  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        3   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        4  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
        5
        6  <head>
        7  	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        8      <!-- <base href="" /> -->
        9  	<title>P&#xE1;gina principal</title>
       10  	<link rel="stylesheet" href="style.css" type="text/css"
       11          media="screen" />
       12  	<link rel="stylesheet" href="print.css" type="text/css"
       13          media="print" />
       14
       15
       16  </head>
       17  <body>
       18
       19  <!-- Contenedor global -->
       20  <div class="container">
       21
       22      <!-- Columna izquierda: logotipo, menÃº global,
       23          validaciones y licencia -->
       24      <div class="left">
       25              <!-- Logotipo -->
       26              <div class="logo">
       27                  <img src="images/taquiones-logo.png"
       28                      alt="Logotipo de Taquiones" />
       29              </div>

Source fragment.html using Kate engine

        URL from  to examples/sources/fragment.html

        1  <?xml version="1.0" encoding="UTF-8"?>
        2  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        3   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        4  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
        5
        6  <head>
        7      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        8      <!-- <base href="" /> -->
        9      <title>P&#xE1;gina principal</title>
       10      <link rel="stylesheet" href="style.css" type="text/css"
       11          media="screen" />
       12      <link rel="stylesheet" href="print.css" type="text/css"
       13          media="print" />
       14
       15
       16  </head>
       17  <body>
       18
       19  <!-- Contenedor global -->
       20  <div class="container">
       21
       22      <!-- Columna izquierda: logotipo, menú global,
       23          validaciones y licencia -->
       24      <div class="left">
       25              <!-- Logotipo -->
       26              <div class="logo">
       27                  <img src="images/taquiones-logo.png"
       28                      alt="Logotipo de Taquiones" />
       29              </div>

Source fragment.html using Vim engine

        URL from  to examples/sources/fragment.html

        1  <?xml version="1.0" encoding="UTF-8"?>
        2  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        3   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        4  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
        5
        6  <head>
        7  	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        8      <!-- <base href="" /> -->
        9  	<title>P&#xE1;gina principal</title>
       10  	<link rel="stylesheet" href="style.css" type="text/css"
       11          media="screen" />
       12  	<link rel="stylesheet" href="print.css" type="text/css"
       13          media="print" />
       14
       15
       16  </head>
       17  <body>
       18
       19  <!-- Contenedor global -->
       20  <div class="container">
       21
       22      <!-- Columna izquierda: logotipo, menú global,
       23          validaciones y licencia -->
       24      <div class="left">
       25              <!-- Logotipo -->
       26              <div class="logo">
       27                  <img src="images/taquiones-logo.png"
       28                      alt="Logotipo de Taquiones" />
       29              </div>

Source function.pl using Simple engine

        URL from  to examples/sources/function.pl

        1  sub connection {
        2      my $class = shift;
        3      my $dsn = shift;
        4      my $user = shift;
        5      my $passwd = shift;
        6      my $attr = shift;
        7
        8      if (not $dsn) {
        9          my $conf = Lidia::Config->new();
       10          $dsn = $conf->db->dsn();
       11          $user = $conf->db->user();
       12          $passwd = $conf->db->passwd();
       13      }
       14
       15      return $class->SUPER::connection( $dsn, $user, $passwd, $attr);
       16  }

Source function.pl using Kate engine

        URL from  to examples/sources/function.pl

        1  sub connection {
        2      my $class = shift;
        3      my $dsn = shift;
        4      my $user = shift;
        5      my $passwd = shift;
        6      my $attr = shift;
        7
        8      if (not $dsn) {
        9          my $conf = Lidia::Config->new();
       10          $dsn = $conf->db->dsn();
       11          $user = $conf->db->user();
       12          $passwd = $conf->db->passwd();
       13      }
       14
       15      return $class->SUPER::connection( $dsn, $user, $passwd, $attr);
       16  }

Source function.pl using Vim engine

        URL from  to examples/sources/function.pl

        1  sub connection {
        2      my $class = shift;
        3      my $dsn = shift;
        4      my $user = shift;
        5      my $passwd = shift;
        6      my $attr = shift;
        7
        8      if (not $dsn) {
        9          my $conf = Lidia::Config->new();
       10          $dsn = $conf->db->dsn();
       11          $user = $conf->db->user();
       12          $passwd = $conf->db->passwd();
       13      }
       14
       15      return $class->SUPER::connection( $dsn, $user, $passwd, $attr);
       16  }

Source page.tmpl using Simple engine

        URL from  to examples/sources/page.tmpl

        1  <HTML>
        2  <HEAD>
        3  <TITLE><TMPL_VAR NAME=title></TITLE>
        4  <LINK REL=StyleSheet HREF="../extras/syntax.css" TYPPE="text/css" MEDIA="all">
        5  </HEAD>
        6  <BODY>
        7      <H1><TMPL_VAR NAME=title></H1>
        8
        9      <P>This page contains examples of syntax highlight using the
       10      IkiWiki::Plugin::syntax and several configuration and programming source
       11      files. </P>
       12
       13      <TMPL_LOOP NAME=results>
       14          <TMPL_VAR NAME=output>
       15          </BR>
       16      </TMPL_LOOP>
       17  </BODY>
       18  </HTML>

Source page.tmpl using Kate engine

        URL from  to examples/sources/page.tmpl

        1  <HTML>
        2  <HEAD>
        3  <TITLE><TMPL_VAR NAME=title></TITLE>
        4  <LINK REL=StyleSheet HREF="../extras/syntax.css" TYPPE="text/css" MEDIA="all">
        5  </HEAD>
        6  <BODY>
        7      <H1><TMPL_VAR NAME=title></H1>
        8
        9      <P>This page contains examples of syntax highlight using the
       10      IkiWiki::Plugin::syntax and several configuration and programming source
       11      files. </P>
       12
       13      <TMPL_LOOP NAME=results>
       14          <TMPL_VAR NAME=output>
       15          </BR>
       16      </TMPL_LOOP>
       17  </BODY>
       18  </HTML>

Source page.tmpl using Vim engine

        URL from  to examples/sources/page.tmpl

        1  <HTML>
        2  <HEAD>
        3  <TITLE><TMPL_VAR NAME=title></TITLE>
        4  <LINK REL=StyleSheet HREF="../extras/syntax.css" TYPPE="text/css" MEDIA="all">
        5  </HEAD>
        6  <BODY>
        7      <H1><TMPL_VAR NAME=title></H1>
        8
        9      <P>This page contains examples of syntax highlight using the
       10      IkiWiki::Plugin::syntax and several configuration and programming source
       11      files. </P>
       12
       13      <TMPL_LOOP NAME=results>
       14          <TMPL_VAR NAME=output>
       15          </BR>
       16      </TMPL_LOOP>
       17  </BODY>
       18  </HTML>

Source sarajevo.conf using Simple engine

        URL from  to examples/sources/sarajevo.conf

        1  #
        2  #	Cliente: Sarajevo
        3  #
        4  Catalog {
        5  	Name 		= Sarajevo
        6  	dbname 		= sarajevo
        7  	user		= bacula
        8  	password	= ""
        9  }
       10
       11  Client	{
       12  	Name		= sarajevo-fd
       13  	Address		= sarajevo.venexma.int
       14  	Catalog		= Sarajevo
       15  	Password	= "XXXXX"
       16  }
       17
       18  Job {
       19  	Name	=	"Sarajevo Semanal"
       20  	Enabled	=	yes
       21  	Type	=	Backup
       22  	Level	=	Full
       23  	Client	=	sarajevo-fd
       24  	FileSet	=	"Archivos de Sarajevo"
       25  	Storage	=	Disco
       26  	Schedule=	"Semanal"
       27  	Messages=	Standard
       28  	Pool	=	Workstation
       29  }
       30
       31  Job {
       32  	Name	=	"Sarajevo restore"
       33  	Type	=	Restore
       34  	Client	=	sarajevo-fd
       35  	FileSet	=	"Archivos de Sarajevo"
       36  	Storage =	Disco
       37  	Messages=	Standard
       38  	Pool	=	Workstation
       39  }
       40
       41  FileSet {
       42  	Name	=	"Archivos de Sarajevo"
       43  	Include {
       44  		Options	{
       45  			compression	=	GZIP;
       46  			signature	=	MD5;
       47  			verify		=	pins5;
       48  			onefs		=	yes;
       49  		}
       50  		File	=	/etc
       51  		File	=	/root
       52  		File	=	/home/victor
       53  	}
       54  	Exclude {
       55  		File	=	/home/victor/downloads
       56  		File	=	/home/victor/Videos
       57  		File	=	/home/victor/mp3
       58  	}
       59  }

Source sarajevo.conf using Kate engine

        URL from  to examples/sources/sarajevo.conf

        1  #
        2  #    Cliente: Sarajevo
        3  #
        4  Catalog {
        5      Name         = Sarajevo
        6      dbname         = sarajevo
        7      user        = bacula
        8      password    = ""
        9  }
       10
       11  Client    {
       12      Name        = sarajevo-fd
       13      Address        = sarajevo.venexma.int
       14      Catalog        = Sarajevo
       15      Password    = "XXXXX"
       16  }
       17
       18  Job {
       19      Name    =    "Sarajevo Semanal"
       20      Enabled    =    yes
       21      Type    =    Backup
       22      Level    =    Full
       23      Client    =    sarajevo-fd
       24      FileSet    =    "Archivos de Sarajevo"
       25      Storage    =    Disco
       26      Schedule=    "Semanal"
       27      Messages=    Standard
       28      Pool    =    Workstation
       29  }
       30
       31  Job {
       32      Name    =    "Sarajevo restore"
       33      Type    =    Restore
       34      Client    =    sarajevo-fd
       35      FileSet    =    "Archivos de Sarajevo"
       36      Storage =    Disco
       37      Messages=    Standard
       38      Pool    =    Workstation
       39  }
       40
       41  FileSet {
       42      Name    =    "Archivos de Sarajevo"
       43      Include {
       44          Options    {
       45              compression    =    GZIP;
       46              signature    =    MD5;
       47              verify        =    pins5;
       48              onefs        =    yes;
       49          }
       50          File    =    /etc
       51          File    =    /root
       52          File    =    /home/victor
       53      }
       54      Exclude {
       55          File    =    /home/victor/downloads
       56          File    =    /home/victor/Videos
       57          File    =    /home/victor/mp3
       58      }
       59  }
       60
       61

Source sarajevo.conf using Vim engine

        URL from  to examples/sources/sarajevo.conf

        1  #
        2  #	Cliente: Sarajevo
        3  #
        4  Catalog {
        5  	Name 		= Sarajevo
        6  	dbname 		= sarajevo
        7  	user		= bacula
        8  	password	= ""
        9  }
       10
       11  Client	{
       12  	Name		= sarajevo-fd
       13  	Address		= sarajevo.venexma.int
       14  	Catalog		= Sarajevo
       15  	Password	= "XXXXX"
       16  }
       17
       18  Job {
       19  	Name	=	"Sarajevo Semanal"
       20  	Enabled	=	yes
       21  	Type	=	Backup
       22  	Level	=	Full
       23  	Client	=	sarajevo-fd
       24  	FileSet	=	"Archivos de Sarajevo"
       25  	Storage	=	Disco
       26  	Schedule=	"Semanal"
       27  	Messages=	Standard
       28  	Pool	=	Workstation
       29  }
       30
       31  Job {
       32  	Name	=	"Sarajevo restore"
       33  	Type	=	Restore
       34  	Client	=	sarajevo-fd
       35  	FileSet	=	"Archivos de Sarajevo"
       36  	Storage =	Disco
       37  	Messages=	Standard
       38  	Pool	=	Workstation
       39  }
       40
       41  FileSet {
       42  	Name	=	"Archivos de Sarajevo"
       43  	Include {
       44  		Options	{
       45  			compression	=	GZIP;
       46  			signature	=	MD5;
       47  			verify		=	pins5;
       48  			onefs		=	yes;
       49  		}
       50  		File	=	/etc
       51  		File	=	/root
       52  		File	=	/home/victor
       53  	}
       54  	Exclude {
       55  		File	=	/home/victor/downloads
       56  		File	=	/home/victor/Videos
       57  		File	=	/home/victor/mp3
       58  	}
       59  }

Source text.pod using Simple engine

        URL from  to examples/sources/text.pod

        1  =head1 NAME
        2
        3  IkiWiki::Plugin::syntax - Add syntax highlighting to ikiwiki
        4
        5  =head1 SYNOPSIS
        6
        7  In any source page include the following:
        8
        9      This is the example code
       10
       11      [[syntax language=perl text="""
       12      #!/usr/bin/perl
       13
       14      print "Hello, world\n";
       15      """]]
       16
       17      and this is my bash profile (using file type autodetection )
       18
       19      [[syntax file="software/examples/mybash_profile"
       20          description="My profile" ]]
       21
       22  In order to facilitate the life to the administrator the plugin could create a
       23  html table with information about the engine capabilities.
       24
       25  Use the directive C without any parameters as is:
       26
       27      This is the syntax engine chart in this site:
       28
       29      [[syntax ]]
       30
       31  =head1 DESCRIPTION
       32
       33  This plugin adds syntax highlight capabilities to Ikiwiki using third party
       34  modules if they are installed.
       35
       36  Those modules can be:
       37
       38  =over
       39
       40  =item * L
       41
       42  Uses the Syntax::Highlight::Engine::Kate package, a port to Perl of the
       43  syntax highlight engine of the Kate text editor.
       44
       45  Copyright (c) 2006 by Hans Jeuken, all rights reserved.
       46
       47  =item * L
       48
       49  This plugin uses the Text::VimColor module and the vim editor.
       50
       51  Copyright 2002-2006, Geoff Richards.
       52
       53  =item * L
       54
       55  This is the default engine. It's a passtrough engine with line numering capability.
       56
       57  =back
       58
       59  and they can be selected at runtime with the C parameter. In
       60  case of fail loading the module the plugin switch to use the simple engine.
       61
       62  The module register a preprocessor directive named B.
       63
       64  =head2 Parameters
       65
       66  The syntax directive has the following parameters:
       67
       68  =over
       69
       70  =item language (optional)
       71
       72  Name of the source language for select the correct plugin. If not defined the
       73  module will try to determine the appropiated value.
       74
       75  =item description (optional)
       76
       77  Text description for the html link
       78
       79  =item text
       80
       81  Source text for syntax highlighting. Mandatory if not exists the file
       82  parameter.
       83
       84  =item file
       85
       86  Ikiwiki page name as source text for syntax highlighting. The final html
       87  includes a link to it for direct download.
       88
       89  =item linenumbers
       90
       91  Enable the line numbers in the final html.
       92
       93  =item bars
       94
       95  Enable the bars feature. The final html text will be label with css tags on the
       96  odd lines.
       97
       98  =item force_subpage
       99
      100  Parameter for inline funcion to the source page
      101
      102  =back
      103
      104  =head2 CSS
      105
      106  The package uses the following list of css tags:
      107
      108  =over
      109
      110  =item
      111
      112  =back
      113
      114  =head1 METHODS/SUBROUTINES
      115
      116  =head2 checkconfig( )
      117
      118  This method is called by IkiWiki main program and the plugin uses it for load
      119  global configuration values and initialize his internals.
      120
      121  =head2 preprocess( )
      122
      123  This method is called when the ikiwiki parser found a C directive.
      124  Without parameters the method show information about the external syntax
      125  parser.
      126
      127  =head1 CONFIGURATION AND ENVIRONMENT
      128
      129  IkiWiki::Plugin::syntax uses the following global parameters:
      130
      131  =over
      132
      133  =item syntax_engine (optional)
      134
      135  Set to a keyword for select the engine to use.
      136
      137  =over
      138
      139  =item Kate
      140
      141  Uses the L as backend.
      142
      143  =item Vim
      144
      145  Uses the L as backend.
      146
      147  =item Simple
      148
      149  Uses the L as backend.
      150
      151  =back
      152
      153  If this parameter is omitted or the external module fails, the plugin switch to
      154  use the Simple engine.
      155
      156  =item syntax_Kate (optional)
      157
      158  Parameters to configure the engine (not implemented yet).
      159
      160  =item syntax_Vim (optional)
      161
      162  Parameters to configure the engine (not implemented yet).
      163
      164  =item syntax_Simple (optional)
      165
      166  Parameters to configure the engine (not implemented yet).
      167
      168  =back
      169
      170  =head1 DEPENDENCIES
      171
      172  The module needs the following perl packages:
      173
      174  =over
      175
      176  =item L
      177
      178  Extension to L for build and install ikiwiki plugins.
      179
      180  =item L
      181
      182  =item L
      183
      184  =item L
      185
      186  =item L
      187
      188  =item L
      189
      190  =item L
      191
      192  =back
      193
      194  And it recommends:
      195
      196  =over
      197
      198  =item L
      199
      200  =item L
      201
      202  =back
      203
      204  =head1 BUGS AND LIMITATIONS
      205
      206  =over
      207
      208  =item Break the markdown indented chain. It can't be used between paragraphs
      209  of one list item. Use it after the item text.
      210
      211  =back
      212
      213  Please report any bugs or feature requests to the author.
      214
      215  =head1 AUTHOR
      216
      217  "Víctor Moral"  C<< victor@taquiones.net >>
      218
      219  =head1 LICENCE AND COPYRIGHT
      220
      221  Copyright (c) 2008, "Víctor Moral".
      222
      223  This program is free software; you can redistribute it and/or modify
      224  it under the terms of the GNU General Public License as published by
      225  the Free Software Foundation; either version 2 of the License, or
      226  any later version.
      227
      228  This program is distributed in the hope that it will be useful,
      229  but WITHOUT ANY WARRANTY; without even the implied warranty of
      230  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      231  GNU General Public License for more details.
      232
      233  You should have received a copy of the GNU General Public License along
      234  with this program; if not, write to the Free Software Foundation, Inc.,
      235  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Source text.pod using Kate engine
        syntax (IkiWiki::Plugin::syntax::Kate) on page none: unknown exception

Source text.pod using Vim engine

        URL from  to examples/sources/text.pod

        1  =head1 NAME
        2
        3  IkiWiki::Plugin::syntax - Add syntax highlighting to ikiwiki
        4
        5  =head1 SYNOPSIS
        6
        7  In any source page include the following:
        8
        9      This is the example code
       10
       11      [[syntax language=perl text="""
       12      #!/usr/bin/perl
       13
       14      print "Hello, world\n";
       15      """]]
       16
       17      and this is my bash profile (using file type autodetection )
       18
       19      [[syntax file="software/examples/mybash_profile"
       20          description="My profile" ]]
       21
       22  In order to facilitate the life to the administrator the plugin could create a
       23  html table with information about the engine capabilities.
       24
       25  Use the directive C<syntax> without any parameters as is:
       26
       27      This is the syntax engine chart in this site:
       28
       29      [[syntax ]]
       30
       31  =head1 DESCRIPTION
       32
       33  This plugin adds syntax highlight capabilities to Ikiwiki using third party
       34  modules if they are installed.
       35
       36  Those modules can be:
       37
       38  =over
       39
       40  =item * L<Syntax::Highlight::Engine::Kate>
       41
       42  Uses the Syntax::Highlight::Engine::Kate package, a port to Perl of the
       43  syntax highlight engine of the Kate text editor.
       44
       45  Copyright (c) 2006 by Hans Jeuken, all rights reserved.
       46
       47  =item * L<Text::VimColor>
       48
       49  This plugin uses the Text::VimColor module and the vim editor.
       50
       51  Copyright 2002-2006, Geoff Richards.
       52
       53  =item * L<IkiWiki::Plugin::syntax::Simple>
       54
       55  This is the default engine. It's a passtrough engine with line numering capability.
       56
       57  =back
       58
       59  and they can be selected at runtime with the C<syntax_engine> parameter. In
       60  case of fail loading the module the plugin switch to use the simple engine.
       61
       62  The module register a preprocessor directive named B<syntax>.
       63
       64  =head2 Parameters
       65
       66  The syntax directive has the following parameters:
       67
       68  =over
       69
       70  =item language (optional)
       71
       72  Name of the source language for select the correct plugin. If not defined the
       73  module will try to determine the appropiated value.
       74
       75  =item description (optional)
       76
       77  Text description for the html link
       78
       79  =item text
       80
       81  Source text for syntax highlighting. Mandatory if not exists the file
       82  parameter.
       83
       84  =item file
       85
       86  Ikiwiki page name as source text for syntax highlighting. The final html
       87  includes a link to it for direct download.
       88
       89  =item linenumbers
       90
       91  Enable the line numbers in the final html.
       92
       93  =item bars
       94
       95  Enable the bars feature. The final html text will be label with css tags on the
       96  odd lines.
       97
       98  =item force_subpage
       99
      100  Parameter for inline funcion to the source page
      101
      102  =back
      103
      104  =head2 CSS
      105
      106  The package uses the following list of css tags:
      107
      108  =over
      109
      110  =item
      111
      112  =back
      113
      114  =head1 METHODS/SUBROUTINES
      115
      116  =head2 checkconfig( )
      117
      118  This method is called by IkiWiki main program and the plugin uses it for load
      119  global configuration values and initialize his internals.
      120
      121  =head2 preprocess( )
      122
      123  This method is called when the ikiwiki parser found a C<syntax> directive.
      124  Without parameters the method show information about the external syntax
      125  parser.
      126
      127  =head1 CONFIGURATION AND ENVIRONMENT
      128
      129  IkiWiki::Plugin::syntax uses the following global parameters:
      130
      131  =over
      132
      133  =item syntax_engine (optional)
      134
      135  Set to a keyword for select the engine to use.
      136
      137  =over
      138
      139  =item Kate
      140
      141  Uses the L<Syntax::Highlight::Engine::Kate> as backend.
      142
      143  =item Vim
      144
      145  Uses the L<Text::VimColor> as backend.
      146
      147  =item Simple
      148
      149  Uses the L<IkiWiki::Plugin::syntax::Simple> as backend.
      150
      151  =back
      152
      153  If this parameter is omitted or the external module fails, the plugin switch to
      154  use the Simple engine.
      155
      156  =item syntax_Kate (optional)
      157
      158  Parameters to configure the engine (not implemented yet).
      159
      160  =item syntax_Vim (optional)
      161
      162  Parameters to configure the engine (not implemented yet).
      163
      164  =item syntax_Simple (optional)
      165
      166  Parameters to configure the engine (not implemented yet).
      167
      168  =back
      169
      170  =head1 DEPENDENCIES
      171
      172  The module needs the following perl packages:
      173
      174  =over
      175
      176  =item L<Module::Build::IkiWiki>
      177
      178  Extension to L<Module::Build> for build and install ikiwiki plugins.
      179
      180  =item L<Class::Accessor::Fast>
      181
      182  =item L<Test::More>
      183
      184  =item L<Exception::Class>
      185
      186  =item L<HTML::Entities>
      187
      188  =item L<HTML::Template>
      189
      190  =item L<URI::Escape>
      191
      192  =back
      193
      194  And it recommends:
      195
      196  =over
      197
      198  =item L<Syntax::Highlight::Engine::Kate>
      199
      200  =item L<Text::VimColor>
      201
      202  =back
      203
      204  =head1 BUGS AND LIMITATIONS
      205
      206  =over
      207
      208  =item Break the markdown indented chain. It can't be used between paragraphs
      209  of one list item. Use it after the item text.
      210
      211  =back
      212
      213  Please report any bugs or feature requests to the author.
      214
      215  =head1 AUTHOR
      216
      217  "Víctor Moral"  C<< victor@taquiones.net >>
      218
      219  =head1 LICENCE AND COPYRIGHT
      220
      221  Copyright (c) 2008, "Víctor Moral".
      222
      223  This program is free software; you can redistribute it and/or modify
      224  it under the terms of the GNU General Public License as published by
      225  the Free Software Foundation; either version 2 of the License, or
      226  any later version.
      227
      228  This program is distributed in the hope that it will be useful,
      229  but WITHOUT ANY WARRANTY; without even the implied warranty of
      230  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      231  GNU General Public License for more details.
      232
      233  You should have received a copy of the GNU General Public License along
      234  with this program; if not, write to the Free Software Foundation, Inc.,
      235  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Source bash.sh using Simple engine

        URL from  to examples/sources/bash.sh

        1  # Long term variables, which may be set in the cvsdeb config file or the
        2  # environment:
        3  # rootdir workdir (if all original sources are kept in one dir)
        4
        5  TEMPDIR=/tmp/$$
        6  mkdir $TEMPDIR || exit 1
        7  TEMPFILE=$TEMPDIR/cl-tmp
        8  trap "rm -f $TEMPFILE; rmdir $TEMPDIR" 0 1 2 3 7 10 13 15
        9
       10  TAGOPT=
       11
       12  # Command line; will bomb out if unrecognised options
       13  TEMP=$(getopt -a -s bash \
       14         -o hC:EH:G:M:P:R:T:U:V:W:Ff:dcnr:x:Bp:Dk:a:Sv:m:e:i:I:t: \
       15         --long help,version,ctp,tC,sgpg,spgp,us,uc,op \
       16         --long si,sa,sd,ap,sp,su,sk,sr,sA,sP,sU,sK,sR,ss,sn \
       17         -n "$PROGNAME" -- "$@")
       18  eval set -- $TEMP

Source bash.sh using Kate engine

        URL from  to examples/sources/bash.sh

        1  # Long term variables, which may be set in the cvsdeb config file or the
        2  # environment:
        3  # rootdir workdir (if all original sources are kept in one dir)
        4
        5  TEMPDIR=/tmp/$$
        6  mkdir $TEMPDIR || exit 1
        7  TEMPFILE=$TEMPDIR/cl-tmp
        8  trap "rm -f $TEMPFILE; rmdir $TEMPDIR" 0 1 2 3 7 10 13 15
        9
       10  TAGOPT=
       11
       12  # Command line; will bomb out if unrecognised options
       13  TEMP=$(getopt -a -s bash \
       14         -o hC:EH:G:M:P:R:T:U:V:W:Ff:dcnr:x:Bp:Dk:a:Sv:m:e:i:I:t: \
       15         --long help,version,ctp,tC,sgpg,spgp,us,uc,op \
       16         --long si,sa,sd,ap,sp,su,sk,sr,sA,sP,sU,sK,sR,ss,sn \
       17         -n "$PROGNAME" -- "$@")
       18  eval set -- $TEMP

Source bash.sh using Vim engine

        URL from  to examples/sources/bash.sh

        1  # Long term variables, which may be set in the cvsdeb config file or the
        2  # environment:
        3  # rootdir workdir (if all original sources are kept in one dir)
        4
        5  TEMPDIR=/tmp/$$
        6  mkdir $TEMPDIR || exit 1
        7  TEMPFILE=$TEMPDIR/cl-tmp
        8  trap "rm -f $TEMPFILE; rmdir $TEMPDIR" 0 1 2 3 7 10 13 15
        9
       10  TAGOPT=
       11
       12  # Command line; will bomb out if unrecognised options
       13  TEMP=$(getopt -a -s bash \
       14         -o hC:EH:G:M:P:R:T:U:V:W:Ff:dcnr:x:Bp:Dk:a:Sv:m:e:i:I:t: \
       15         --long help,version,ctp,tC,sgpg,spgp,us,uc,op \
       16         --long si,sa,sd,ap,sp,su,sk,sr,sA,sP,sU,sK,sR,ss,sn \
       17         -n "$PROGNAME" -- "$@")
       18  eval set -- $TEMP

Source smart_comments.pl using Simple engine

        URL from  to examples/sources/smart_comments.pl

        1  #!/usr/bin/perl
        2
        3  use strict;
        4  use Carp;
        5
        6  # use Smart::Comments;
        7
        8  # Valores iniciales
        9  our $text = 'Hola';
       10  our $dinero = 3000.03;
       11
       12  ### Texto: $text
       13  ### Dinero: $dinero
       14
       15  $text =~ s/Hola/Adios/;
       16  $dinero /= 24;
       17
       18  ### Texto: $text
       19  ### Dinero: $dinero
       20
       21  exit (0);

Source smart_comments.pl using Kate engine

        URL from  to examples/sources/smart_comments.pl

        1  #!/usr/bin/perl
        2
        3  use strict;
        4  use Carp;
        5
        6  # use Smart::Comments;
        7
        8  # Valores iniciales
        9  our $text = 'Hola';
       10  our $dinero = 3000.03;
       11
       12  ### Texto: $text
       13  ### Dinero: $dinero
       14
       15  $text =~ s/Hola/Adios/;
       16  $dinero /= 24;
       17
       18  ### Texto: $text
       19  ### Dinero: $dinero
       20
       21  exit (0);

Source smart_comments.pl using Vim engine

        URL from  to examples/sources/smart_comments.pl

        1  #!/usr/bin/perl
        2
        3  use strict;
        4  use Carp;
        5
        6  # use Smart::Comments;
        7
        8  # Valores iniciales
        9  our $text = 'Hola';
       10  our $dinero = 3000.03;
       11
       12  ### Texto: $text
       13  ### Dinero: $dinero
       14
       15  $text =~ s/Hola/Adios/;
       16  $dinero /= 24;
       17
       18  ### Texto: $text
       19  ### Dinero: $dinero
       20
       21  exit (0);