At the end, I got the idea of

-          Subclassing Pod::Simple to detect the start line of pod directive 
that I want to select and extract from a pod file. The end line is when a cut 
is met or when another directive  given in the select method begins

-          Having a $parser ->select({ head1 =>["Name", 
"this\\s*is\\s*a\\s*title" ], head2=>{"foo", "bar"}   }) method, to give pod 
directive to select section of the pod. Here the selected pod directives would 
be

=head1 Name
     ....
=head2 Foo
  ...
=head 1 This is a title
     .....
=head2 bar
    ....


-           Having all the entries for a pod directive given in ->select and 
found in the file, stored with the start line and line and the corresponding 
array ref given in select. That should not eat too much memory.

-          Using Tie::File to extract the line ( start ... end) for each pod 
directive found in the file. Since Tie::File does not load the file into 
memory,  this should work even for big files.


For the few simple test I have made, it works... even if one has something like
=head2 This get C<complicated>

Have I reinvented the wheel or is it worth to make a Pode::Simple::Select 
module with these  ~190 lines of codes ?
Thanks

François

Reply via email to