From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id F19694103D for ; Mon, 6 Nov 2023 17:32:14 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0F3C168C985; Mon, 6 Nov 2023 19:32:10 +0200 (EET) Received: from s.wrqvtzvf.outbound-mail.sendgrid.net (s.wrqvtzvf.outbound-mail.sendgrid.net [149.72.126.143]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 64AFB68C1E2 for ; Mon, 6 Nov 2023 19:32:03 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=frankplowman.com; h=content-type:mime-version:subject:references:from:in-reply-to:to:cc: content-type:from:subject:to; s=s1; bh=fCYqqf4uN/8dIAiRS76XkL1dhaZ15zaJPYtVWc13/Xc=; b=i4eyCnVjCXcD5HQxe8WxM6X7NHRPPHOCgDSaZTCtT+LKzfwjBbgUH9L4mbW9XV4lX3mP ZhCeUzUOuUsewbFljVH3azMwJjTfgNoG9CY4cQW2///HPOaaTq45r4f5ffcvJ9qFB9HOnz Z/gpbGp+6R5+AslTk3hWIh/tsGKyEaPJUiFzJTZgsrdMzYQ+sc2XI+85W8OwvlUfk9XyPq 6Z/RdeC3Eu1YMax+0sYZfYwIUPV28yBTWH1OSV+R5bHzT1izTKzgvE7kcESVhmj61f7ZZL 6o3+owA491ZLpe0B7TGknxuo4kHNoiWDo9kcyza7xOEHTDEsBNMhIbR/E8zfbA2w== Received: by filterdrecv-656b5b4c75-x6z58 with SMTP id filterdrecv-656b5b4c75-x6z58-1-654922EC-6F 2023-11-06 17:31:24.824885307 +0000 UTC m=+1723890.453384663 Received: from [10.0.0.6] (unknown) by geopod-ismtpd-3 (SG) with ESMTP id lTSdl_vFTvWy-MJ_Jq6IFQ for ; Mon, 06 Nov 2023 17:31:24.671 +0000 (UTC) Message-ID: Date: Mon, 06 Nov 2023 17:31:24 +0000 (UTC) MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-GB References: <20231105135335.85752-1-post@frankplowman.com> From: Frank Plowman In-Reply-To: X-SG-EID: =?us-ascii?Q?Uj3aYg52c+LLQjRSx2kNrre9PZxeM4UYymiuV7D=2FDFCrUPtmdddVVDUZk3miaV?= =?us-ascii?Q?h1=2FJO1FFHK2V1NQv9+VwRIHHeOp8pUouX=2F7UkD0?= =?us-ascii?Q?4NXO2D7NAutA2fZb9PAOyN9a3stPNrX8N7ibZ2a?= =?us-ascii?Q?1gSjHaCILvdyMPgEJNxKxLYZ5V6UCuPruP+X1R7?= =?us-ascii?Q?+qW7PQFe57h5KYq0xB9XZS2Q=2F9S+PzV6TcH5Aa5?= =?us-ascii?Q?0VG1tFMx3niPl+0Y3jbmTQam90foyOZg34qRGV?= To: ffmpeg-devel@ffmpeg.org X-Entity-ID: LpPALsXh5JN/Quf2dstifQ== X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH] doc/t2h: Support texinfo 7.0 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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".