Math::...umpers(3pm)
π Math::Symbolic::Custom::DefaultDumpers (3pm) π
okay bestie, so this is the manual page for Math::Symbolic::Custom::DefaultDumpers β it's a Perl module, it lives in section 3pm of the manual, and it's part of the User Contributed Perl Documentation. It's the home of the default output routines for Math::Symbolic trees. Let's get into it π«Ά
β¨ NAME β¨
Math::Symbolic::Custom::DefaultDumpers β the default Math::Symbolic output routines. That's the whole vibe. It dumps. It's the default. Iconic behavior, no notes π
πΈ SYNOPSIS πΈ
use Math::Symbolic qw/parse_from_string/;
$term = parse_from_string(...);
my ($sub, $leftover_trees) = $term->to_sub();
Likeβ¦ that's it. That's the whole teaser. Very "come get your output routines" energy β¨
π¦ DESCRIPTION π¦
So this is a class of default output routines for Math::Symbolic trees. Class. Of. Routines. She's organized π
And it does not come alone β the roster is:
Math::Symbolic::Custom::DefaultTestsβ which defines the default tree testing routinesMath::Symbolic::Custom::DefaultModsβ which has the default tree modification methods
If you want the full tea on how the custom method delegation model actually works, go look at the Math::Symbolic::Custom and Math::Symbolic::Custom::Base classes. They explain it way better than I can in a group chat, fr fr.
π EXPORT π
Okay so, like, please go read the docs for Math::Symbolic::Custom::Base for the details on this one. But the headline is: do not try to use the standard Exporter semantics with this class. It's giving "not like other modules". Respect that π
π SUBROUTINES π
These are the girlies. The main characters. Let's meet them π₯°
π to_string
So rn, to_string is currently implemented in the module core namespaces, and it will be moved to Math::Symbolic::DefaultDumpers in a future release. So it's technically crashing here before it moves out. Glow up incoming, lowkey π
It takes one optional argument that says whether the Math::Symbolic tree should get transformed into a string using 'postfix' notation or 'infix' notation.
The default isinfix, which is also the one more likely to be reparseable by theMath::Symbolicparser. So if you want your stuff to round-trip, bestie, stay in infix π«Ά
π to_code
This method is a wrapper around the compile_to_code class method in the Math::Symbolic::Compiler module. π§
It takes key/value pairs of variables and integers as argument. The integers should start at 0, and they determine the order of the variables/parameters to the compiled code. Yes, order matters. It always matters π
It returns:
- the compiled code, and
- a reference to an array of possible leftover tree elements that could not be compiled
For the full details, please refer to the Math::Symbolic::Compiler man page. She has the receipts π₯
π to_sub
This method is a wrapper around the compile_to_sub class method in the Math::Symbolic::Compiler module. Same family, different function β¨
It takes key/value pairs of variables and integers as argument. The integers should start at 0, and they determine the order of the variables/parameters to the compiled code. (Yes, same rule as above. Consistency queen.)
It returns:
- the compiled sub, and
- a reference to an array of possible leftover tree elements that could not be compiled
Again: please refer to the Math::Symbolic::Compiler man page for details. Go read it. I'm literally begging π
π AUTHOR π
Okay so if you've got feedback, bug reports, or support requests, please send them to the Math::Symbolic support mailing list:
math-symbolic-support at lists dot sourceforge dot net
And pls consider letting us know how you use Math::Symbolic. Genuinely. We want to know. Thank you π
If you're interested in helping with development or extending the module's functionality, hit up the developers' mailing list instead:
math-symbolic-develop at lists dot sourceforge dot net
And now, the contributor roll call β absolute legends, every single one π:
Steffen MοΏ½ller, symbolic-module at steffen-mueller dot net
Stray Toaster, mwk at users dot sourceforge dot net
Oliver EbenhοΏ½h
π SEE ALSO π
New versions of this module can be found on http://steffen-mueller.net or on CPAN. And the module development takes place on Sourceforge at http://sourceforge.net/projects/math-symbolic/ β go check it out, iykyk π¦
The squad:
Math::Symbolic::CustomMath::Symbolic::Custom::DefaultModsMath::Symbolic::Custom::DefaultTestsMath::Symbolic
and that's the page, bestie π tysm for reading the whole thing, you ate. this was perl v5.40.0, dated 2024-09-16 β and yeah, the title is Math::...umpers(3pm), it's foreshortened, we don't talk about it π
mwah π bye!!
π¦ where this page comes from
- ubuntu resolute: libmath-symbolic-perl 0.613-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmath-symbolic-perl 0.613-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms