XSBuild...emplate(3)

πŸ“¦
version 0.28 Β· 4 versions
, in epel 9

okay bestie, welcome to XSBuild...emplate(3) β€” the manual page from User Contributed Perl Documentation that is literally giving raw code dump realness πŸ’…. Buckle up, because this page is a little unhinged but we’re gonna get through it together, fr fr.

πŸ’– NAME πŸ’–

the NAME is just:

$module

that’s it. that’s the whole name. iconic minimalism, no cap πŸŽ€.

✨ FUNCTIONS ✨

okay so this section is not playing around β€” it’s a straight-up code block, and I’m obsessed with how chaotic it is. the way it starts mid-brace? main character energy 😭. here’s every single line exactly as it appears, because we do not edit the sacred text:

       } ;
           }

       #
       --------------------------------------------------------------------------

       sub gen_pod_func

           {
           my ($self, $objclass, $obj, $method, $args, $retclass, $ret, $comment, $since) = @_ ;

           my $argnames = join (',', map {  $_ -> {name} } @{$args}[($objclass?1:0)..$#$args]) ;
           my $rettext  = $retclass?'$ret = ':'' ;
           my $objtext  = $objclass?"$obj -> ":'' ;

           my $data = qq{

   \@func: $method()
       $rettext$objtext $method($argnames)

           } ;

               foreach $arg (@$args)
                   {
                   $data .= qq{

           \@param: $arg->{class} $arg->{name}

           $arg->{comment} } ;
                   }

               if ($retclass)
                   {
                   $data .= qq{

           \@ret: $retclass

           $retcomment } ;
                   }

               $data .= qq{

           \@since: $since

       $comment

       } ;

           return $data ;
           }

       #
       --------------------------------------------------------------------------

       sub gen_pod_struct_member

           {
           my ($self, $objclass, $obj, $memberclass, $member, $comment, $since) = @_ ;

       qq{

   \@func: $member()
       \$val = $obj -> $member(\$newval)

       \@param: $objclass $obj
       \@param: $memberclass \$newval
           } .

           ($since?"=item \@since: $since\n\n":'') .

           qq{ =back

           $comment

           } ;

               }

            1;

like, there are two subs in there: gen_pod_func and gen_pod_struct_member, and they are doing the absolute most with qq{} strings and \@ escapes. the way that join line just goes off β€” we respect it 🫢.

😭 POD ERRORS 😭

not me opening the POD errors section and finding out the doc itself is in its flop era πŸ’€. it literally says:

Hey! The above document had some coding errors, which are explained below:

and then it hits us with:

  • Around line 57: You can't have =items (as at line 65) unless the first thing after the =over is an =item
  • Around line 110: =over without closing =back

so yeah, the POD parser is not happy, bestie. it’s giving β€œI found the vibes, but the syntax did not pass the vibe check” 😭. no cap, those line numbers are literally in the original and we’re keeping them exactly.


mwah πŸ’‹ this page is from perl v5.32.1, dated 2019-10-17, and it’s literally XSBuild...emplate(3). bye bestie, go forth and maybe close that =back 🫢✨

πŸ“¦ where this page comes from