\cat programming
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());
질문이나 개선사항은 여기에 남겨주세요.