build:...::Utils(3pm)
π NAME π
Wx::build::Utils β it's the utility routines page, bestie. Little helper functions that do the behind-the-scenes grunt work. Perl contrib docs, you know the vibe.
β¨ SUBROUTINES β¨
π¦ xs_dependencies
my %dependencies = xs_dependencies( $mm_object, [ 'dir1', 'dir2' ] );
Okay so you hand it a $mm_object and a list of dirs (as an array ref, [ 'dir1', 'dir2' ]), and it gives you back a %dependencies hash. That's the whole thing. Slay. π
π obj_from_src
my @obj_files = obj_from_src( 'Foo.xs', 'bar.c', 'cpp/bar.cpp' );
This one is giving glow-up energy for source files β it takes your source file names and works out the corresponding object file names. In scalar context it just returns the first file, so don't come at it expecting the whole list if you're not in list context. π
πΈ write_string, write_file
write_string( 'file', $scalar );
write_file( 'file', $scalar );
These two? Literally like File::Slurp. You give it a filename and a scalar, it writes the string out to that file. Besties fr fr. π«Ά
β read_file
my $string = read_file( 'file' );
Reads the file, hands you the string back. Iconic, no notes. π
π lib_file, arch_file, arch_auto_file
my $file = lib_file( 'Foo.pm' ); # blib/lib/Foo.pm on *nix
my $file = lib_file( 'Foo/Bar.pm' ); # blib\lib\Foo\Bar.pm on Win32
my $file = arch_auto_file( 'My\My.dll' ); # blib\arch\auto\My\My.dll
Look at the slashes doing their little platform serve β *nix gets forward slashes, Win32 gets backslashes, and the output lands in the blib tree. π
β οΈ Important rule, no cap: all input paths must be relative, but your output paths may be absolute. Don't mix that up or the vibe check fails.
π§ path_search
my $file = path_search( 'foo.exe' );
It searches PATH for the executable you name. That's it. That's the function. π«
π files_with_constants
my @files = files_with_constants;
Finds files containing constants. Short king of a subroutine. π
π₯ files_with_overload
my @files = files_with_overload;
Finds files containing overloaded XS/Perl subroutines. Periodt. π
and that's the whole page, bestie!! π¦β¨ This one comes courtesy of the User Contributed Perl Documentation β yeah, we're reading build:...::Utils(3pm) β from perl v5.42.3, dated 2026-08-20. Go off, utility routines. ππ
π¦ where this page comes from
- ubuntu stonking: libwx-perl 1:0.9932-10build2 Β· 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