@@ -4,12 +4,13 @@ use XML::Axk::Core;
4
4
5
5
# BEGIN { require Exporter; $Exporter::Verbose=1; }
6
6
7
- use version 0.77; our $VERSION = version-> declare(" v0.1.0" );
7
+ # Semantic versioning, packed per Perl rules. Must always be at least one
8
+ # digit left of the decimal, and six digits right of the decimal. For
9
+ # prerelease versions, put an underscore before the last three digits.
10
+ our $VERSION = ' 0.001_002' ;
8
11
9
12
use Getopt::Long qw( GetOptionsFromArray :config gnu_getopt) ;
10
13
11
- # use Web::Query::LibXML;
12
-
13
14
use constant DEBUG => false;
14
15
15
16
# Shell exit codes
@@ -136,8 +137,10 @@ sub Main {
136
137
parse_command_line(from => $lrArgs , into => \%opts );
137
138
138
139
if ($opts {PRINT_VERSION }) {
139
- use XML::Axk;
140
- say " axk $XML::Axk::VERSION " ;
140
+ $VERSION =~ m < ^([^\. ]+)\. (\d {3})(_?)(\d {3})> ;
141
+ printf " axk version %d .%d .%d ($VERSION )%s \n " , $1 , $2 , $4 ,
142
+ ($3 ? ' (dev)' : ' ' );
143
+
141
144
return 0;
142
145
}
143
146
@@ -187,10 +190,6 @@ __END__
187
190
188
191
XML::Axk::App - ack-like XML processor, command-line interface
189
192
190
- =head1 VERSION
191
-
192
- Version 0.1.0
193
-
194
193
=head1 USAGE
195
194
196
195
axk [options] [--] [script] [input filename(s)]
@@ -217,14 +216,14 @@ Run the axk code given as B<text>.
217
216
218
217
Run the axk code given in the file called B<filename > .
219
218
220
- =item -L, --language B<language >
219
+ =item -L, --language B<lang >
221
220
222
221
B<Not yet implemented: >
223
- Interpret the following B<-e > in axk language B<language > .
222
+ Interpret the following B<-e > in axk language B<lang > .
224
223
225
224
=item --show B<what >
226
225
227
- Show debugging information. Currently implemented are:
226
+ Show debugging information. Currently- implemented B< what > values are:
228
227
229
228
=over
230
229
@@ -245,6 +244,21 @@ Print the version of axk and exit
245
244
246
245
=back
247
246
247
+ =head1 PERL INTERFACE
248
+
249
+ For use in Perl programs:
250
+
251
+ use XML::Axk::App; # pick whichever you want,
252
+ use XML::Axk::Core; # or both
253
+
254
+ # Canned interface, as if run from the command line
255
+ XML::Axk::App::Main(\@ARGV)
256
+
257
+ # Perl interface
258
+ my $axk = XML::Axk::Core->new();
259
+
260
+ For details about the library interface, see L<XML::Axk::Core> .
261
+
248
262
=head1 AUTHOR
249
263
250
264
Christopher White, C<cxwembedded at gmail.com >
0 commit comments