Scroll to navigation

Juman::GDBM_File(3pm) User Contributed Perl Documentation Juman::GDBM_File(3pm)

NAME

Juman::GDBM_File - Wrapper class of GDBM_File

SYNOPSIS

 use Juman::GDBM_File;
 use encoding "euc-jp";
 tie( %hash, 'Juman::GDBM_File', $dbfile, &GDBM_WRCREAT, 0640 ) or die;
 $hash{"添字"} = "値";
 while( my( $key, $value ) = each %hash ){
     print "$key:$value\n";
 }

DESCRIPTION

Perl-5.8.x �内部文字コード��� Unicode を採用���る.����,日 本語 EUC �記述�れ�データベースファイルを�照�る場���,添字や値 を書�込ん�り,読�出��り�る��,常�明示的� encode/decode を行 �必���る.

�� "Juman::GDBM_File" クラス�,特定�文字コード��存�れ��るデー タベースファイルを扱����,��的� encode/decode を行�.

ENCODING

��クラスを利用�る時�,データベース��入出力時�使�文字コードを, "encoding" プラグマ�指定�る."encoding" プラグマ�よる指定�存在� ��場��,����変�を行���.

CONSTRUCTOR

"GDBM_File" ��一�書��,連想�列を作���る.

    tie( %hash, 'Juman::GDBM_File', $dbfile, &GDBM_WRCREAT, 0640 );

第5引数��,データベースファイルを新�作��る場��ファイル属性�指 定�れ��る.

第5引数を�略��場��,"DB_File" 互��書��使�れ��る�見��れ る.

    tie( %hash, 'Juman::GDBM_File', $dbfile, &O_CREAT );

��場�,データベースファイルを開�モードを指定���る第4引数��, "O_CREAT", "O_RDWR" �� "DB_File" 形��データベースを開�時��� 指定を使�.データベースファイルを新�作��る場��ファイル属性�, "umask" �返り値�ら自動的�算出�れる.

SEE ALSO

  • GDBM_File
  • perltie

AUTHOR

土屋 雅稔 <tsuchiya@pine.kuee.kyoto-u.ac.jp>

POD ERRORS

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

Non-ASCII character seen before =encoding in '$hash{"添字"}'. Assuming CP1252
=over without closing =back
2022-09-03 perl v5.34.0