From: satomichan <...@...> Date: Tue, 24 Mar 2026 14:56:27 +0000 (+0900) Subject: Perl版の読み込みに, HTTP ではなく直接ファイルを読むように. X-Git-Url: https://satomichan.jp/gitweb/?a=commitdiff_plain;p=tel2ma%2F.git Perl版の読み込みに, HTTP ではなく直接ファイルを読むように. --- diff --git a/misc/make-tel2ma.js.pl b/misc/make-tel2ma.js.pl index b60c072..da8bfc4 100755 --- a/misc/make-tel2ma.js.pl +++ b/misc/make-tel2ma.js.pl @@ -5,15 +5,16 @@ use strict; use warnings; -my $URL = 'https://satomichan.jp/gitweb/?p=tel2ma/.git;a=blob_plain;f=tel2ma.pl'; +use FindBin; +chdir $FindBin::Bin or die; header(); -open(my $wget, '-|', "wget '$URL' -q -O -") or die; +open(my $PL, '../tel2ma.pl') or die; print "function get_ma_info(tel) {\n"; -foreach my $line (<$wget>) { +foreach my $line (<$PL>) { next unless $line =~ /^__DATA__/ .. 1; next if $line =~ /^__DATA__/; @@ -65,7 +66,7 @@ __DATA__ tel2ma.js 日本国内電話番号 -> 市外局番・MA・市町村 取得プログラム -Copyright 2025 FUKUDA Satomi (https://satomichan.jp/about_tel2ma) +Copyright 2025-2026 FUKUDA Satomi (https://satomichan.jp/about_tel2ma) Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License.