/[suikacvs]/messaging/manakai/bin/daf.pl
Suika

Diff of /messaging/manakai/bin/daf.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by wakaba, Tue May 16 11:26:24 2006 UTC revision 1.14 by wakaba, Fri May 19 11:02:11 2006 UTC
# Line 16  use Cwd; Line 16  use Cwd;
16  use Getopt::Long;  use Getopt::Long;
17  use Pod::Usage;  use Pod::Usage;
18  my %Opt = (create_module => []);  my %Opt = (create_module => []);
19    my @target_modules;
20  GetOptions (  GetOptions (
21      'create-dtd-modules=s' => sub {
22        shift;
23        my $i = [split /\s+/, shift, 3];
24        $i->[3] = 'dtd-modules';
25        push @{$Opt{create_module}}, $i;
26      },
27    'create-perl-module=s' => sub {    'create-perl-module=s' => sub {
28      shift;      shift;
29      my $i = [split /\s+/, shift, 3];      my $i = [split /\s+/, shift, 3];
30      $i->[3] = 'perl-pm';      $i->[3] = 'perl-pm';
31      push @{$Opt{create_module}}, $i;      push @{$Opt{create_module}}, $i;
32        push @target_modules, [$i->[0], $i->[2]];
33    },    },
34    'create-perl-test=s' => sub {    'create-perl-test=s' => sub {
35      shift;      shift;
36      my $i = [split /\s+/, shift, 3];      my $i = [split /\s+/, shift, 3];
37      $i->[3] = 'perl-t';      $i->[3] = 'perl-t';
38      push @{$Opt{create_module}}, $i;      push @{$Opt{create_module}}, $i;
39        push @target_modules, [$i->[0], $i->[2]];
40    },    },
41    'debug' => \$Opt{debug},    'debug' => \$Opt{debug},
42    'dis-file-suffix=s' => \$Opt{dis_suffix},    'dis-file-suffix=s' => \$Opt{dis_suffix},
# Line 35  GetOptions ( Line 44  GetOptions (
44    'dafs-file-suffix=s' => \$Opt{dafs_suffix},    'dafs-file-suffix=s' => \$Opt{dafs_suffix},
45    'dafx-file-suffix=s' => \$Opt{dafx_suffix},    'dafx-file-suffix=s' => \$Opt{dafx_suffix},
46    'help' => \$Opt{help},    'help' => \$Opt{help},
47      'load-module=s' => sub {
48        shift;
49        my $i = [split /\s+/, shift, 2];
50        push @target_modules, [$i->[0], $i->[1]];
51      },
52    'search-path|I=s' => sub {    'search-path|I=s' => sub {
53      shift;      shift;
54      my @value = split /\s+/, shift;      my @value = split /\s+/, shift;
# Line 129  for (@{$Opt{create_module}}) { Line 143  for (@{$Opt{create_module}}) {
143      $feature{ExpandedURI q<fe:GenericLS>} = '3.0';      $feature{ExpandedURI q<fe:GenericLS>} = '3.0';
144      $feature{'+' . ExpandedURI q<DIS:TDT>} = '1.0';      $feature{'+' . ExpandedURI q<DIS:TDT>} = '1.0';
145      $feature{'+' . ExpandedURI q<Util:PerlCode>} = '1.0';      $feature{'+' . ExpandedURI q<Util:PerlCode>} = '1.0';
146      } elsif ($out_type eq 'dtd-modules') {
147        require 'manakai/daf-dtd-modules.pl';
148        $feature{ExpandedURI q<fe:GenericLS>} = '3.0';
149        $feature{'+' . ExpandedURI q<fe:XDP>} = '3.0';
150    }    }
151  }  }
152    
# Line 158  my %ModuleNameNamespaceBinding = ( Line 176  my %ModuleNameNamespaceBinding = (
176      ## property.      ## property.
177  );  );
178    
 my @target_modules;  
 for (@{$Opt{create_module}}) {  
   my ($mod_uri, $out_path, $mod_for, $out_type) = @$_;  
   push @target_modules, [$mod_uri, $mod_for];  
 }  
   
179  my $ResourceCount = 0;  my $ResourceCount = 0;
180  $db->pl_update_module (\@target_modules,  $db->pl_update_module (\@target_modules,
181  get_module_index_file_name => sub {  get_module_index_file_name => sub {
# Line 294  for (@{$Opt{create_module}}) { Line 306  for (@{$Opt{create_module}}) {
306      daf_perl_pm ($mod_uri, $out_file_path, $mod_for);      daf_perl_pm ($mod_uri, $out_file_path, $mod_for);
307    } elsif ($out_type eq 'perl-t') {    } elsif ($out_type eq 'perl-t') {
308      daf_perl_t ($mod_uri, $out_file_path, $mod_for);      daf_perl_t ($mod_uri, $out_file_path, $mod_for);
309      } elsif ($out_type eq 'dtd-modules') {
310        daf_dtd_modules ($mod_uri, $out_file_path, $mod_for);
311    }    }
312  }  }
313    

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24