Index . 블로그창고 . Any comments?

\cat programming

SpringFile

springfile/SpringFile.pl 2007-06-26

SpringFile은 SpringNote의 DB를 텍스트파일처럼 접근할 수 있게 도와주는 Perl 함수모음이다. aero님의 Springnote 모듈을 사용한다. 현재 제공되는 함수는 다음과 같다.

아래와 같이 사용한다.

do "SpringFile.pl";

initNote("my.yml");

print "'SpringFile 테스트' 페이지 생성\n";
my $nh = openNote(">SpringFile 테스트");
writeNote($nh, "SpringFile: 페이지 생성을 테스트한다.");
closeNote($nh);

print "'SpringFile 테스트' 페이지 내용추가\n";
$nh = openNote(">>SpringFile 테스트");
writeNote($nh, "SpringFile: 페이지 내용추가를 테스트한다.");
closeNote($nh);

print "'SpringFile 테스트' 페이지 읽기\n";
$nh = openNote("SpringFile 테스트");
print readNote($nh)."\n";
closeNote($nh);

print "'SpringFile 테스트/하부페이지' 페이지 생성\n";
$nh = openNote(">SpringFile 테스트/하부페이지");
writeNote($nh, "SpringFile 하부페이지: 페이지 생성을 테스트한다.");
closeNote($nh);

print "'SpringFile 테스트/하부페이지' 페이지 읽기\n";
$nh = openNote("SpringFile 테스트/하부페이지");
print readNote($nh)."\n";
closeNote($nh);

print "'SpringFile 테스트/하부페이지' 페이지 읽기\n";
$nh = openNote("하부페이지");
print readNote($nh)."\n";
closeNote($nh);

print "= 페이지 리스트 =\n";
print "$_\n" foreach(readNoteList());

질문이나 개선사항은 여기에 남겨주세요.


All the works in this site except software and copyrighted materials by others (e.g., 문학) are licensed under a Creative Commons License. 소프트웨어 및 문학과 같이 다른 이에게 저작권이 있는 작품을 제외하고 모두 크리에이티브 커먼즈 라이센스를 따른다.
Mon Mar 25 00:59:58 2024 . XHTML . CSS (lightbox.css is not part of Uniqki. ;-) . Powered by Uniqki!
refresh . edit . loginout . index