Professional Web Applications Themes

Bootloader-like message module? - PERL Modules

Howdy - Anyone know of a module that makes it easy to emit messages like this: System parameter updates... CLOCK_UTC......................................... ..... [OK] NTP Servers........................................... . [ERROR] DNS Servers........................................... . [WARN] System parameter updates................................. [DONE] I've looked at Debug::Message, Log::Dispatch, and PTools::Debug, but they're not quite what I had in mind. The idea is that nested subs or qx()'s/system()'s to other scripts tell what they're about to do, and the module handles the alignment, the progress dot-dots, indentation, bullets, colorizing, etc. If not, I'll write & submit one... - Steve...

Sponsored Links
  1. #1

    Default Bootloader-like message module?

    Howdy -

    Anyone know of a module that makes it easy to emit messages like this:

    System parameter updates...
    CLOCK_UTC......................................... ..... [OK]
    NTP Servers........................................... . [ERROR]
    DNS Servers........................................... . [WARN]
    System parameter updates................................. [DONE]

    I've looked at Debug::Message, Log::Dispatch, and PTools::Debug,
    but they're not quite what I had in mind.

    The idea is that nested subs or qx()'s/system()'s to other scripts tell
    what they're about to do, and the module handles the alignment, the
    progress dot-dots, indentation, bullets, colorizing, etc.

    If not, I'll write & submit one...
    - Steve
    Sponsored Links
    Steve Guest

  2. #2

    Default Re: Bootloader-like message module?

    OK, I wrote a module for this. Can anyone suggest a namespace to stick
    it in? Log::, Term::, Msg::, ??? For now, I'm calling it 'Tell' :


    Tell version 0.1.3

    The Tell package is used to print balanced and nested messages
    with a completion status. These messages indent easily within
    eachother, autocomplete on scope exit, are easily pd, may be
    bulleted, can be filtered, span across processes, and even can show
    status in color.

    For example, you write code like this:

    use Tell qw/:all/;
    tell "Reconfiguring the grappolator";
    do_whatchamacallit();
    do_something_else();

    It begins by printing:

    Reconfiguring the grappolator...

    Then it does "whatchamacallit" and "something else". When these are
    complete it adds the rest of the line: a bunch of dots and the status.

    Reconfiguring the grappolator............................ [DONE]

    The do_whatchamacallit() and do_something_else() subroutines may also
    'tell' what they're doing, and indicate success or failure or whatever,
    so you can get nice output like this:

    Reconfiguring the grappolator...
    Processing whatchamacallit............................. [WARN]
    Fibulating something else...
    Fibulation phase one................................. [OK]
    Fibulation phase two................................. [ERROR]
    Wrapup of fibulation................................. [OK]
    Reconfiguring the grappolator............................ [DONE]
    Steve Guest

  3. #3

    Default Re: Bootloader-like message module?

    Howdy -

    I'm still looking for suggestions for the module name.
    IO::Tell? Msg::Tell? Print::Tell? CLI::Tell? Any ideas welcome!

    - Steve
     
    Steve Guest

  4. #4

    Default Re: Bootloader-like message module?

    FWIW, I've selected Term::Emit for the namespace.
    Steve Guest

Similar Threads

  1. Module to spew bootloader-like messages?
    By Steve in forum PERL Modules
    Replies: 3
    Last Post: August 13th, 03:02 PM
  2. what module is the windows message box in?
    By corn29@ no_spam excite.com in forum PERL Modules
    Replies: 3
    Last Post: September 25th, 06:36 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139