NAME
MsOffice::Word::Surgeon::Field - internal representation for a MsWord field
DESCRIPTION
This is used internally by MsOffice::Word::Surgeon for storing a MsWord field.
METHODS
new
my $field = MsOffice::Word::Surgeon::Field(
xml_before => $xml_string,
code => $code_instruction_string,
result => $xml_fragment,
status => 'begin',
);
Constructor for a new field object. Arguments are :
- xml_before
-
A string containing arbitrary XML preceding that field in the complete document. The string may be empty but must be present.
- code
-
A code containing the instruction string for that field. If the instruction string contains embedded fields, these are represented through the "show_embedded_field" in MsOffice::Word::Surgeon syntax -- by default, just a pair of curly braces.
- result
-
An XML fragment corresponding to the last update of that field in MsWord.
- status
-
One of
begin,separate, orend.Status
beginorseparateare intermediate, used internally during the parsing process. Normally all fields are inendstatus.
add_to_code
While parsing fields, additional field instruction fragments are added through this method
add_to_result
While parsing fields, additional XML fragments belonging to the field result are added through this method
AUTHOR
Laurent Dami, <dami AT cpan DOT org<gt>
COPYRIGHT AND LICENSE
Copyright 2024 by Laurent Dami.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.