oEdtk::Spool - Helper module for parsing printer spool files


  use oEdtk::Main;
  use oEdtk::Spool;

  oe_new_job($ARGV[0], $ARGV[1]);
  my $s = oEdtk::Spool->new(\*IN, \*OUT);


  oe_compo_link($ARGV[0], $ARGV[1]);

  sub process($$) {
    my ($s, $line) = @_;
    if ($s->{'inres'} eq 'XYZ') {
    } else {


This module handles the repetitive tasks associated with the parsing of spool files: it extracts the identifiers of the resource blocks, the channel jumps, and passes this information along with the current line to a callback function. As a result, the first four characters of the original line from the stream are stripped.



The new method creates a Spool object given two filehandles: the first one for input, and the second one for output. However, the second filehandle is currently unused since we now use the oEdtk::C7Doc module for handling output.


The parse method takes a function reference as a parameter, and calls this function for each line of the input file, passing it the Spool object as the parameter, and the current line as the second parameter. The first four characters of the original line from the stream are stripped.


The emit method is deprecated and should not be used in new code.



The identifier of the current resource block.


The identifier of the previous resource block.


The current line number (starting at 1) in the resource block.


The channel jump, if any.


A hash reference used as a state within the scope of a resource block. It will be emptied before the callback function is called at the beginning of each resource block.


oEdtk::Main, oEdtk::C7Doc


Copyright 2009 - Maxime Henrion <>