From: Frank Plowman <post@frankplowman.com> To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH] doc/t2h: Support texinfo 7.0 Date: Mon, 06 Nov 2023 17:31:24 +0000 (UTC) Message-ID: <f00b853b-f484-43fe-97ae-67ec853d2240@frankplowman.com> (raw) In-Reply-To: <ZUgCkv9puqFgs2Os@mariano> On 05/11/2023 21:01, Stefano Sabatini wrote: >> @@ -159,7 +192,18 @@ sub ffmpeg_begin_file($$$) >> my ($title, $description, $encoding, $date, $css_lines, >> $doctype, $bodytext, $copying_comment, $after_body_open, >> $extra_head, $program_and_version, $program_homepage, >> - $program, $generator) = $self->_file_header_informations($command); >> + $program, $generator); >> + if ($program_version_num >= 7.000000) { >> + ($title, $description, $encoding, $date, $css_lines, >> + $doctype, $bodytext, $copying_comment, $after_body_open, >> + $extra_head, $program_and_version, $program_homepage, >> + $program, $generator) = $self->_file_header_information($command); >> + } else { >> + ($title, $description, $encoding, $date, $css_lines, >> + $doctype, $bodytext, $copying_comment, $after_body_open, >> + $extra_head, $program_and_version, $program_homepage, >> + $program, $generator) = $self->_file_header_informations($command); >> + } > nit: maybe can be refactored a bit to avoid the duplication (but my > perl is rusty and I cannot test with texinfo 7.0): > > my $get_header_information_fn = $program_version_num >= 7.000000 ? $self->_file_header_information : $self->_file_header_informations; > my (...) = $get_header_information_fn($command); > > [...] I've just had a little fiddle to try get this working, and unfortunately it looks like while you can create references to normal subroutines, you can't easily bind to object methods in Perl. There are some workarounds (see https://stackoverflow.com/questions/47077879/perl-pass-object-method-reference-as-parameter-to-function), but imo they are less readable. This is the first Perl I've ever written so if any wizards out there know a better way please let me know and I'd be happy to put together a v2. > Looks good otherwise, thanks. > _______________________________________________ > Cheers, Frank -- https://www.frankplowman.com/ _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2023-11-06 17:32 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-11-05 13:53 post 2023-11-05 21:01 ` Stefano Sabatini 2023-11-06 17:31 ` Frank Plowman [this message] 2023-11-06 18:18 ` Gyan Doshi 2023-11-06 23:36 ` Stefano Sabatini 2023-11-06 23:38 ` Stefano Sabatini
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=f00b853b-f484-43fe-97ae-67ec853d2240@frankplowman.com \ --to=post@frankplowman.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git