Loading ...
Sorry, an error occurred while loading the content.

Perldoc clips

Expand Messages
  • Sheri
    Hi, Here are my latest Perldoc clips, pretty useful I think. If you don t enter anything in the clip wizard, the clip retrieves (or switches to) the Perldoc
    Message 1 of 1 , Feb 16, 2003
    • 0 Attachment
      Hi,

      Here are my latest Perldoc clips, pretty useful I think.

      If you don't enter anything in the clip wizard, the clip retrieves (or switches to) the Perldoc for Tk. Otherwise, you can enter a perldoc name or select Tk or perltoc from the drop box. In Tk or perltoc you can locate and highlight a perldoc name (e.g., highlight "Tk::UserGuide" or "perlfunc") and rerun the clip to load that doc.

      Each opened perldoc goes into a new document buffer and is named according to its subject (no more "Noname??.doc").

      The second clip, "Close temporary files", discards all open documents that have no matching disk file. So it closes all open Perldocs without prompting you to save them. Be sure to save any other new documents you want to keep prior to using this clip.

      Regards,
      Sheri

      H="PerlDoc"
      ;by Sheri Pierce, rev 2/16/03
      ^!IfTrue ^$IsEmpty(^$GetSelection$)$ Next Else SetSel
      ^!Set %Sel%="^?{(T=C)Enter Perldoc Target==|Tk|Perltoc}"
      ^!IfFalse ^$IsEmpty(^%Sel%)$ Next Else OpenTkToc
      :ShowExisting
      ^!SetDocIndex ^$GetDocIndex(^$StrReplace("::";"-";"^%Sel%";No;No)$)$
      ^!IfSame "^$GetDocName$" "^$StrReplace("::";"-";"^%Sel%";No;No)$" PD_End
      :Doit
      ^!IfTrue ^$IsEmpty(^$GetOutput("C:\Program Files\Perl\bin\perldoc.bat" "^%Sel%")$)$ Error
      ^!ToolBar New Document
      ^!InsertText "^%Sel%"
      ^!InsertText ^P
      ^!InsertText "--------------"
      ^!InsertText ^P
      ^!InsertText ^$GetOutput("C:\Program Files\Perl\bin\perldoc.bat" "^%Sel%")$
      ^!Jump Doc_Start
      ^!RenameDoc "^$StrReplace("::";"-";"^%Sel%";No;No)$"
      ^!Goto PD_End
      :SetSel
      ^!Set %Sel%="^$GetSelection$"
      ^!Goto Doit
      :OpenTkToc
      ^!Set %Sel%="Tk"
      ^!Goto ShowExisting
      :Error
      ^!Info No such doc: ^%Sel%
      :PD_End
      ^!ClearVariable %Sel%
      ;end of clip

      H="Close temporary files"
      ;by Sheri Pierce, rev 2/16/03
      ^!Set %count%=^$GetDocCount$
      :Loop
      ^!If ^%count%=0 Out
      ^!IfFileExist ^$GetDocName(^%count%)$ Skip_1
      ^!Close "^$GetDocName(^%count%)$" Discard
      ^!Dec %count%
      ^!Goto Loop
      :Out
      ^!ClearVariable %count%
      ;end of clip
    Your message has been successfully submitted and would be delivered to recipients shortly.