2 |
use vars qw(%PROP %SET %SET_ALIAS $VERSION); |
use vars qw(%PROP %SET %SET_ALIAS $VERSION); |
3 |
$VERSION=do{my @r=(q$Revision$=~/\d+/g);sprintf "%d."."%02d" x $#r,@r}; |
$VERSION=do{my @r=(q$Revision$=~/\d+/g);sprintf "%d."."%02d" x $#r,@r}; |
4 |
|
|
5 |
|
$PROP{perl_namespace_name} = 'Char::Class::'; |
6 |
$PROP{module_name} = 'FooScript'; |
$PROP{module_name} = 'FooScript'; |
7 |
|
|
8 |
sub header () { |
sub header () { |
11 |
## Do not edit by hand! |
## Do not edit by hand! |
12 |
use strict; |
use strict; |
13 |
|
|
14 |
package Char::InSet::$PROP{module_name}; |
package $PROP{perl_namespace_name}$PROP{module_name}; |
15 |
use Exporter; |
our \$VERSION = '$PROP{version}'; |
16 |
use vars qw(\@EXPORT_OK \@ISA \$VERSION); |
@{[ |
17 |
\@ISA = qw(Exporter); |
#use Exporter; |
18 |
\$VERSION = '$PROP{version}'; |
#use vars qw(\@EXPORT_OK \@ISA \$VERSION); |
19 |
|
#\@ISA = qw(Exporter); |
20 |
|
]} |
21 |
|
package main; |
22 |
|
|
23 |
=head1 NAME |
=head1 NAME |
24 |
|
|
25 |
$PROP{module_name}.pm --- @{[ $PROP{script_name} || $PROP{module_name} ]} character sets for C<\\p{In@{[ exists $PROP{prefix_name} ? $PROP{prefix_name} : $PROP{module_name} ]}HogeHoge}> regexps |
$PROP{module_name}.pm --- @{[ $PROP{script_name} || $PROP{module_name} ]} character set classes for C<\\p{In@{[ exists $PROP{prefix_name} ? $PROP{prefix_name} : $PROP{module_name} ]}HogeHoge}> regexps |
26 |
@{[$PROP{pod_description}? " |
@{[$PROP{pod_description}? " |
27 |
=head1 DESCRIPTION |
=head1 DESCRIPTION |
28 |
|
|
43 |
$SET{$_} =~ s{^#\+(\w+)$}{ |
$SET{$_} =~ s{^#\+(\w+)$}{ |
44 |
push @aline, qq(\&In${prefix}$1.); '' |
push @aline, qq(\&In${prefix}$1.); '' |
45 |
}mge; |
}mge; |
46 |
$SET{$_} =~ s{^!(.+)$}{ ## Pre-formated |
$SET{$_} =~ s{^!(.+)$}{ ## Pre-formatted |
47 |
push @aitem, $1; '' |
push @aitem, $1; '' |
48 |
}mge; |
}mge; |
49 |
$SET{$_} =~ s{^#DESCRIPTION\x20(.+)$}{ |
$SET{$_} =~ s{^#DESCRIPTION\x20(.+)$}{ |
50 |
$set_description{qq(In${prefix}$_)} = $1; |
$set_description{qq(In${prefix}$_)} = $1; '' |
51 |
}me; |
}me; |
52 |
$SET{$_} =~ s{^#.+$}{}mg; |
$SET{$_} =~ s{^#.+$}{}mg; |
53 |
$SET{$_} =~ tr/\x09\x0A\x0D\x20//d; |
$SET{$_} =~ tr/\x09\x0A\x0D\x20//d; |
68 |
push @set, [qq(In${prefix}$_) => qq(\*In${prefix}$_ = \\&In${prefix}$SET_ALIAS{$_};)]; |
push @set, [qq(In${prefix}$_) => qq(\*In${prefix}$_ = \\&In${prefix}$SET_ALIAS{$_};)]; |
69 |
} |
} |
70 |
|
|
71 |
$r = qq(\@EXPORT_OK = qw(@{[map {$_->[0]} @set]});\n\n); |
#$r = qq(\@EXPORT_OK = qw(@{[map {$_->[0]} @set]});\n\n); |
72 |
$r .= join '', map {$_->[1]."\n\n"} @set; |
$r .= join '', map {$_->[1]."\n\n"} @set; |
73 |
|
|
74 |
$r .= "=head1 COLLECTION NAMES\n\n=over 4\n\n"; |
$r .= "=head1 COLLECTION NAMES\n\n=over 4\n\n"; |
87 |
@{[$PROP{pod_example}? " |
@{[$PROP{pod_example}? " |
88 |
=head1 EXAMPLE |
=head1 EXAMPLE |
89 |
|
|
90 |
$PROP{pod_example}":'']}@{[$PROP{pod_see_also}? " |
$PROP{pod_example}":" |
91 |
|
=head1 EXAMPLE |
92 |
|
|
93 |
|
use $PROP{perl_namespace_name}$PROP{module_name}; |
94 |
|
if (\$s =~ /\\p{In$PROP{module_name}HogeHoge}/) { |
95 |
|
print \"Match!\\n\"; |
96 |
|
} |
97 |
|
"]}@{[$PROP{pod_see_also}? " |
98 |
=head1 SEE ALSO |
=head1 SEE ALSO |
99 |
|
|
100 |
$PROP{pod_see_also}":'']}@{[$PROP{pod_license}? " |
$PROP{pod_see_also}":'']}@{[$PROP{pod_license}? " |
144 |
|
|
145 |
=head1 NAME |
=head1 NAME |
146 |
|
|
147 |
mkpm.pl --- Char::InSet::Han modules generating library |
mkpm.pl --- Char::Class::* modules generating library |
148 |
|
|
149 |
=head1 LICENSE |
=head1 LICENSE |
150 |
|
|
151 |
Copyright 2002 Wakaba <w@suika.fam.cx> |
Copyright 2002-2003 Wakaba <w@suika.fam.cx> |
152 |
|
|
153 |
This library and the library generated by it is free software; |
This library and the library generated by it is free software; |
154 |
you can redistribute them and/or modify them under the same |
you can redistribute them and/or modify them under the same |