Debian Codegraph @

Embperl/Syntax/Perl.pm

raw
1
2 ###################################################################################
3 #
4 # Embperl - Copyright (c) 1997-2008 Gerald Richter / ecos gmbh www.ecos.de
5 # Embperl - Copyright (c) 2008-2014 Gerald Richter
6 #
7 # You may distribute under the terms of either the GNU General Public
8 # License or the Artistic License, as specified in the Perl README file.
9 #
10 # THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
11 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
12 # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13 #
14 # $Id: Perl.pm 1578075 2014-03-16 14:01:14Z richter $
15 #
16 ###################################################################################
17
18 package Embperl::Syntax::Perl ;
19
20 use Embperl::Syntax qw{:types} ;
21 use Embperl::Syntax ;
22
23 use strict ;
24 use vars qw{@ISA} ;
25
26 @ISA = qw(Embperl::Syntax) ;
27
28
29 ###################################################################################
30 #
31 # Methods
32 #
33 ###################################################################################
34
35 # ---------------------------------------------------------------------------------
36 #
37 # Create new Syntax Object
38 #
39 # ---------------------------------------------------------------------------------
40
41
42 sub new
43
44 {
45 my $class = shift ;
46
47 my $self = Embperl::Syntax::new ($class) ;
48
49 if (!$self -> {-perlInit})
50 {
51 $self -> {-perlInit} = 1 ;
52
53 $self -> AddInitCode (undef, '$_ep_node=%$x%+2; %#1% ;', undef,
54 {
55 removenode => 32,
56 compilechilds => 0,
57 }) ;
58
59 }
60
61
62 return $self ;
63 }
64
65
66
67
68 1;
69
70 __END__
71
72 =pod
73
74 =head1 NAME
75
76 Embperl::Syntax::Perl - define Perl syntax for Embperl
77
78 =head1 SYNOPSIS
79
80 Execute ({inputfile => 'code.pl', syntax => 'Perl'}) ;
81
82 =head1 DESCRIPTION
83
84 This syntax cause Embperl to interpret the whole file as Perl script
85 without any markup.
86
87 =head1 Author
88
89 Gerald Richter <richter at embperl dot org>
90
91
92 =cut
93
94