MsOffi...:Field(3pm)
π MsOffice::Word::Surgeon::Field(3pm) π
okay bestie, gather round β this is the User Contributed Perl Documentation page for MsOffice::Word::Surgeon::Field, and no, the title is not clickbait, it literally is that.
β¨ NAME β¨
MsOffice::Word::Surgeon::Field β the internal representation for a MsWord field, and she is serving structure π
πΈ DESCRIPTION πΈ
So basically? This little icon is used internally by MsOffice::Word::Surgeon for storing a MsWord field. Not your problem, not your business, but now you know her π«Ά
π METHODS π
π¦ new π¦
my $field = MsOffice::Word::Surgeon::Field(
xml_before => $xml_string,
code => $code_instruction_string,
result => $xml_fragment,
status => 'begin',
);
Constructor for a brand new field object, slay β¨ The arguments are, in order of appearance:
xml_beforeβ a string holding arbitrary XML that comes before that field in the complete document. The string is allowed to be empty, but bestie, it must be present. No ghosting this argument. Must be there, even if she's empty. periodt.codeβ a code containing the instruction string for that field. And here's the tea π΅: if that instruction string has embedded fields inside it, they get represented through the"show_embedded_field" in MsOffice::Word::Surgeonsyntax β and by default that's just a pair of curly braces.{}and that's it, iconic.resultβ an XML fragment matching the last update of that field in MsWord. The receipt, if you will π§Ύstatusβ one of"begin","separate", or"end".
Status "begin" or "separate" are intermediate β used internally while the parsing process is doing its thing. Normally though, all fields are out here living in "end" status π
π add_to_code π
While parsing fields, additional field instruction fragments get added through this method. It's giving "helper function doing the most behind the scenes" π
π add_to_result π
While parsing fields, additional XML fragments belonging to the field result get added through this method. Same energy, different pile π
β type β
The first instruction in the code part, eg "REF", "QUOTE", "ASK", "DOCPROPERTY", etc.
π Note: in the Microsoft Word Object Model, the <https://learn.microsoft.com/en-us/office/vba/api/word.field.type|Field.Type> attribute is an integer value in an enumerated type. Here though? The attribute is just an uppercase string, no cap. Lists of valid field types can be found in the Word documentation. (Yes the original says "valild" β we don't fix, we only vibe β¨)
π AUTHOR π
Laurent Dami, <dami AT cpan DOT org<gt>
π COPYRIGHT AND LICENSE π
Copyright 2024 by Laurent Dami.
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.
and that's the whole page bestie, you ate that reading session fr fr π
courtesy of perl v5.40.1, dated 2025-10-05 β big love to the MsOffi...:Field(3pm) girlies, iykyk π
π
π¦ where this page comes from
- ubuntu resolute: libmsoffice-word-surgeon-perl 2.11-1 Β· Artistic-2.0
- ubuntu stonking: libmsoffice-word-surgeon-perl 2.11-1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms