← Index
NYTProf Performance Profile   « line view »
For Makefile.PL
  Run on Sun Mar 1 16:04:44 2015
Reported on Sun Mar 1 16:09:02 2015

FilenameC:/tmp64ng/perl/vendor/lib/Win32/Console.pm
StatementsExecuted 322 statements in 0s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
0000s0sWin32::Console::::AUTOLOADWin32::Console::AUTOLOAD
0000s0sWin32::Console::::AttrWin32::Console::Attr
0000s0sWin32::Console::::ClsWin32::Console::Cls
0000s0sWin32::Console::::CursorWin32::Console::Cursor
0000s0sWin32::Console::::DESTROYWin32::Console::DESTROY
0000s0sWin32::Console::::DisplayWin32::Console::Display
0000s0sWin32::Console::::FillAttrWin32::Console::FillAttr
0000s0sWin32::Console::::FillCharWin32::Console::FillChar
0000s0sWin32::Console::::FlushWin32::Console::Flush
0000s0sWin32::Console::::GenerateCtrlEventWin32::Console::GenerateCtrlEvent
0000s0sWin32::Console::::GetEventsWin32::Console::GetEvents
0000s0sWin32::Console::::InfoWin32::Console::Info
0000s0sWin32::Console::::InputWin32::Console::Input
1110s0sWin32::Console::::InputCPWin32::Console::InputCP
0000s0sWin32::Console::::InputCharWin32::Console::InputChar
0000s0sWin32::Console::::MaxWindowWin32::Console::MaxWindow
0000s0sWin32::Console::::ModeWin32::Console::Mode
1110s0sWin32::Console::::OutputCPWin32::Console::OutputCP
0000s0sWin32::Console::::PeekInputWin32::Console::PeekInput
0000s0sWin32::Console::::ReadAttrWin32::Console::ReadAttr
0000s0sWin32::Console::::ReadCharWin32::Console::ReadChar
0000s0sWin32::Console::::ReadRectWin32::Console::ReadRect
0000s0sWin32::Console::::ScrollWin32::Console::Scroll
0000s0sWin32::Console::::SelectWin32::Console::Select
0000s0sWin32::Console::::SetIconWin32::Console::SetIcon
0000s0sWin32::Console::::SizeWin32::Console::Size
0000s0sWin32::Console::::TitleWin32::Console::Title
0000s0sWin32::Console::::WindowWin32::Console::Window
0000s0sWin32::Console::::WriteWin32::Console::Write
0000s0sWin32::Console::::WriteAttrWin32::Console::WriteAttr
0000s0sWin32::Console::::WriteCharWin32::Console::WriteChar
0000s0sWin32::Console::::WriteInputWin32::Console::WriteInput
0000s0sWin32::Console::::WriteRectWin32::Console::WriteRect
1110s0sWin32::Console::::_GetConsoleCPWin32::Console::_GetConsoleCP (xsub)
1110s0sWin32::Console::::_GetConsoleOutputCPWin32::Console::_GetConsoleOutputCP (xsub)
1110s0sWin32::Console::::bootstrapWin32::Console::bootstrap (xsub)
643010s0sWin32::Console::::constantWin32::Console::constant (xsub)
0000s0sWin32::Console::::get_Win32_IPC_HANDLEWin32::Console::get_Win32_IPC_HANDLE
0000s0sWin32::Console::::newWin32::Console::new
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1#######################################################################
2#
3# Win32::Console - Win32 Console and Character Mode Functions
4#
5#######################################################################
6
7package Win32::Console;
8
910srequire Exporter;
1010srequire DynaLoader;
11
1210s$VERSION = "0.10";
13
1410s@ISA= qw( Exporter DynaLoader );
1510s@EXPORT = qw(
16 BACKGROUND_BLUE
17 BACKGROUND_GREEN
18 BACKGROUND_INTENSITY
19 BACKGROUND_RED
20 CAPSLOCK_ON
21 CONSOLE_TEXTMODE_BUFFER
22 CTRL_BREAK_EVENT
23 CTRL_C_EVENT
24 ENABLE_ECHO_INPUT
25 ENABLE_LINE_INPUT
26 ENABLE_MOUSE_INPUT
27 ENABLE_PROCESSED_INPUT
28 ENABLE_PROCESSED_OUTPUT
29 ENABLE_WINDOW_INPUT
30 ENABLE_WRAP_AT_EOL_OUTPUT
31 ENHANCED_KEY
32 FILE_SHARE_READ
33 FILE_SHARE_WRITE
34 FOREGROUND_BLUE
35 FOREGROUND_GREEN
36 FOREGROUND_INTENSITY
37 FOREGROUND_RED
38 LEFT_ALT_PRESSED
39 LEFT_CTRL_PRESSED
40 NUMLOCK_ON
41 GENERIC_READ
42 GENERIC_WRITE
43 RIGHT_ALT_PRESSED
44 RIGHT_CTRL_PRESSED
45 SCROLLLOCK_ON
46 SHIFT_PRESSED
47 STD_INPUT_HANDLE
48 STD_OUTPUT_HANDLE
49 STD_ERROR_HANDLE
50 $FG_BLACK
51 $FG_GRAY
52 $FG_BLUE
53 $FG_LIGHTBLUE
54 $FG_RED
55 $FG_LIGHTRED
56 $FG_GREEN
57 $FG_LIGHTGREEN
58 $FG_MAGENTA
59 $FG_LIGHTMAGENTA
60 $FG_CYAN
61 $FG_LIGHTCYAN
62 $FG_BROWN
63 $FG_YELLOW
64 $FG_LIGHTGRAY
65 $FG_WHITE
66 $BG_BLACK
67 $BG_GRAY
68 $BG_BLUE
69 $BG_LIGHTBLUE
70 $BG_RED
71 $BG_LIGHTRED
72 $BG_GREEN
73 $BG_LIGHTGREEN
74 $BG_MAGENTA
75 $BG_LIGHTMAGENTA
76 $BG_CYAN
77 $BG_LIGHTCYAN
78 $BG_BROWN
79 $BG_YELLOW
80 $BG_LIGHTGRAY
81 $BG_WHITE
82 $ATTR_NORMAL
83 $ATTR_INVERSE
84 @CONSOLE_COLORS
85);
86
87
88#######################################################################
89# This AUTOLOAD is used to 'autoload' constants from the constant()
90# XS function. If a constant is not found then control is passed
91# to the AUTOLOAD in AutoLoader.
92#
93
94sub AUTOLOAD {
95 my($constname);
96 ($constname = $AUTOLOAD) =~ s/.*:://;
97 #reset $! to zero to reset any current errors.
98 local $! = 0;
99 my $val = constant($constname, @_ ? $_[0] : 0);
100 if ($! != 0) {
101# if ($! =~ /Invalid/) {
102# $AutoLoader::AUTOLOAD = $AUTOLOAD;
103# goto &AutoLoader::AUTOLOAD;
104# } else {
105 ($pack, $file, $line) = caller; undef $pack;
106 die "Symbol Win32::Console::$constname not defined, used at $file line $line.";
107# }
108 }
109 eval "sub $AUTOLOAD { $val }";
110 goto &$AUTOLOAD;
111}
112
113
114#######################################################################
115# STATIC OBJECT PROPERTIES
116#
117
118# %HandlerRoutineStack = ();
119# $HandlerRoutineRegistered = 0;
120
121#######################################################################
122# PUBLIC METHODS
123#
124
125#========
126sub new {
127#========
128 my($class, $param1, $param2) = @_;
129
130 my $self = {};
131
132 if (defined($param1)
133 and ($param1 == constant("STD_INPUT_HANDLE", 0)
134 or $param1 == constant("STD_OUTPUT_HANDLE", 0)
135 or $param1 == constant("STD_ERROR_HANDLE", 0)))
136 {
137 $self->{'handle'} = _GetStdHandle($param1);
138 }
139 else {
140 $param1 = constant("GENERIC_READ", 0) | constant("GENERIC_WRITE", 0) unless $param1;
141 $param2 = constant("FILE_SHARE_READ", 0) | constant("FILE_SHARE_WRITE", 0) unless $param2;
142 $self->{'handle'} = _CreateConsoleScreenBuffer($param1, $param2,
143 constant("CONSOLE_TEXTMODE_BUFFER", 0));
144 }
145 bless $self, $class;
146 return $self;
147}
148
149#============
150sub Display {
151#============
152 my($self) = @_;
153 return undef unless ref($self);
154 return _SetConsoleActiveScreenBuffer($self->{'handle'});
155}
156
157#===========
158sub Select {
159#===========
160 my($self, $type) = @_;
161 return undef unless ref($self);
162 return _SetStdHandle($type, $self->{'handle'});
163}
164
165#===========
166sub SetIcon {
167#===========
168 my($self, $icon) = @_;
169 $icon = $self unless ref($self);
170 return _SetConsoleIcon($icon);
171}
172
173#==========
174sub Title {
175#==========
176 my($self, $title) = @_;
177 $title = $self unless ref($self);
178
179 if (defined($title)) {
180 return _SetConsoleTitle($title);
181 }
182 else {
183 return _GetConsoleTitle();
184 }
185}
186
187#==============
188sub WriteChar {
189#==============
190 my($self, $text, $col, $row) = @_;
191 return undef unless ref($self);
192 return _WriteConsoleOutputCharacter($self->{'handle'},$text,$col,$row);
193}
194
195#=============
196sub ReadChar {
197#=============
198 my($self, $size, $col, $row) = @_;
199 return undef unless ref($self);
200
201 my $buffer = (" " x $size);
202 if (_ReadConsoleOutputCharacter($self->{'handle'}, $buffer, $size, $col, $row)) {
203 return $buffer;
204 }
205 else {
206 return undef;
207 }
208}
209
210#==============
211sub WriteAttr {
212#==============
213 my($self, $attr, $col, $row) = @_;
214 return undef unless ref($self);
215 return _WriteConsoleOutputAttribute($self->{'handle'}, $attr, $col, $row);
216}
217
218#=============
219sub ReadAttr {
220#=============
221 my($self, $size, $col, $row) = @_;
222 return undef unless ref($self);
223 return _ReadConsoleOutputAttribute($self->{'handle'}, $size, $col, $row);
224}
225
226#==========
227sub Write {
228#==========
229 my($self,$string) = @_;
230 return undef unless ref($self);
231 return _WriteConsole($self->{'handle'}, $string);
232}
233
234#=============
235sub ReadRect {
236#=============
237 my($self, $left, $top, $right, $bottom) = @_;
238 return undef unless ref($self);
239
240 my $col = $right - $left + 1;
241 my $row = $bottom - $top + 1;
242
243 my $buffer = (" " x ($col*$row*4));
244 if (_ReadConsoleOutput($self->{'handle'}, $buffer,
245 $col, $row, 0, 0,
246 $left, $top, $right, $bottom))
247 {
248 return $buffer;
249 }
250 else {
251 return undef;
252 }
253}
254
255#==============
256sub WriteRect {
257#==============
258 my($self, $buffer, $left, $top, $right, $bottom) = @_;
259 return undef unless ref($self);
260
261 my $col = $right - $left + 1;
262 my $row = $bottom - $top + 1;
263
264 return _WriteConsoleOutput($self->{'handle'}, $buffer,
265 $col, $row, 0, 0,
266 $left, $top, $right, $bottom);
267}
268
269#===========
270sub Scroll {
271#===========
272 my($self, $left1, $top1, $right1, $bottom1,
273 $col, $row, $char, $attr,
274 $left2, $top2, $right2, $bottom2) = @_;
275 return undef unless ref($self);
276
277 return _ScrollConsoleScreenBuffer($self->{'handle'},
278 $left1, $top1, $right1, $bottom1,
279 $col, $row, $char, $attr,
280 $left2, $top2, $right2, $bottom2);
281}
282
283#==============
284sub MaxWindow {
285#==============
286 my($self, $flag) = @_;
287 return undef unless ref($self);
288
289 if (not defined($flag)) {
290 my @info = _GetConsoleScreenBufferInfo($self->{'handle'});
291 return $info[9], $info[10];
292 }
293 else {
294 return _GetLargestConsoleWindowSize($self->{'handle'});
295 }
296}
297
298#=========
299sub Info {
300#=========
301 my($self) = @_;
302 return undef unless ref($self);
303 return _GetConsoleScreenBufferInfo($self->{'handle'});
304}
305
306#===========
307sub Window {
308#===========
309 my($self, $flag, $left, $top, $right, $bottom) = @_;
310 return undef unless ref($self);
311
312 if (not defined($flag)) {
313 my @info = _GetConsoleScreenBufferInfo($self->{'handle'});
314 return $info[5], $info[6], $info[7], $info[8];
315 }
316 else {
317 return _SetConsoleWindowInfo($self->{'handle'}, $flag, $left, $top, $right, $bottom);
318 }
319}
320
321#==============
322sub GetEvents {
323#==============
324 my($self) = @_;
325 return undef unless ref($self);
326 return _GetNumberOfConsoleInputEvents($self->{'handle'});
327}
328
329#==========
330sub Flush {
331#==========
332 my($self) = @_;
333 return undef unless ref($self);
334 return _FlushConsoleInputBuffer($self->{'handle'});
335}
336
337#==============
338sub InputChar {
339#==============
340 my($self, $number) = @_;
341 return undef unless ref($self);
342
343 $number = 1 unless defined($number);
344
345 my $buffer = (" " x $number);
346 if (_ReadConsole($self->{'handle'}, $buffer, $number) == $number) {
347 return $buffer;
348 }
349 else {
350 return undef;
351 }
352}
353
354#==========
355sub Input {
356#==========
357 my($self) = @_;
358 return undef unless ref($self);
359 return _ReadConsoleInput($self->{'handle'});
360}
361
362#==============
363sub PeekInput {
364#==============
365 my($self) = @_;
366 return undef unless ref($self);
367 return _PeekConsoleInput($self->{'handle'});
368}
369
370#===============
371sub WriteInput {
372#===============
373 my($self) = shift;
374 return undef unless ref($self);
375 return _WriteConsoleInput($self->{'handle'}, @_);
376}
377
378#=========
379sub Mode {
380#=========
381 my($self, $mode) = @_;
382 return undef unless ref($self);
383 if (defined($mode)) {
384 return _SetConsoleMode($self->{'handle'}, $mode);
385 }
386 else {
387 return _GetConsoleMode($self->{'handle'});
388 }
389}
390
391#========
392sub Cls {
393#========
394 my($self, $attr) = @_;
395 return undef unless ref($self);
396
397 $attr = $ATTR_NORMAL unless defined($attr);
398
399 my ($x, $y) = $self->Size();
400 my($left, $top, $right ,$bottom) = $self->Window();
401 my $vx = $right - $left;
402 my $vy = $bottom - $top;
403 $self->FillChar(" ", $x*$y, 0, 0);
404 $self->FillAttr($attr, $x*$y, 0, 0);
405 $self->Cursor(0, 0);
406 $self->Window(1, 0, 0, $vx, $vy);
407}
408
409#=========
410sub Attr {
411#=========
412 my($self, $attr) = @_;
413 return undef unless ref($self);
414
415 if (not defined($attr)) {
416 return (_GetConsoleScreenBufferInfo($self->{'handle'}))[4];
417 }
418 else {
419 return _SetConsoleTextAttribute($self->{'handle'}, $attr);
420 }
421}
422
423#===========
424sub Cursor {
425#===========
426 my($self, $col, $row, $size, $visi) = @_;
427 return undef unless ref($self);
428
429 my $curr_row = 0;
430 my $curr_col = 0;
431 my $curr_size = 0;
432 my $curr_visi = 0;
433 my $return = 0;
434 my $discard = 0;
435
436
437 if (defined($col)) {
438 $row = -1 if not defined($row);
439 if ($col == -1 or $row == -1) {
440 ($discard, $discard, $curr_col, $curr_row) = _GetConsoleScreenBufferInfo($self->{'handle'});
441 $col=$curr_col if $col==-1;
442 $row=$curr_row if $row==-1;
443 }
444 $return += _SetConsoleCursorPosition($self->{'handle'}, $col, $row);
445 if (defined($size) and defined($visi)) {
446 if ($size == -1 or $visi == -1) {
447 ($curr_size, $curr_visi) = _GetConsoleCursorInfo($self->{'handle'});
448 $size = $curr_size if $size == -1;
449 $visi = $curr_visi if $visi == -1;
450 }
451 $size = 1 if $size < 1;
452 $size = 99 if $size > 99;
453 $return += _SetConsoleCursorInfo($self->{'handle'}, $size, $visi);
454 }
455 return $return;
456 }
457 else {
458 ($discard, $discard, $curr_col, $curr_row) = _GetConsoleScreenBufferInfo($self->{'handle'});
459 ($curr_size, $curr_visi) = _GetConsoleCursorInfo($self->{'handle'});
460 return ($curr_col, $curr_row, $curr_size, $curr_visi);
461 }
462}
463
464#=========
465sub Size {
466#=========
467 my($self, $col, $row) = @_;
468 return undef unless ref($self);
469
470 if (not defined($col)) {
471 ($col, $row) = _GetConsoleScreenBufferInfo($self->{'handle'});
472 return ($col, $row);
473 }
474 else {
475 $row = -1 if not defined($row);
476 if ($col == -1 or $row == -1) {
477 ($curr_col, $curr_row) = _GetConsoleScreenBufferInfo($self->{'handle'});
478 $col=$curr_col if $col==-1;
479 $row=$curr_row if $row==-1;
480 }
481 return _SetConsoleScreenBufferSize($self->{'handle'}, $col, $row);
482 }
483}
484
485#=============
486sub FillAttr {
487#=============
488 my($self, $attr, $number, $col, $row) = @_;
489 return undef unless ref($self);
490
491 $number = 1 unless $number;
492
493 if (!defined($col) or !defined($row) or $col == -1 or $row == -1) {
494 ($discard, $discard,
495 $curr_col, $curr_row) = _GetConsoleScreenBufferInfo($self->{'handle'});
496 $col = $curr_col if !defined($col) or $col == -1;
497 $row = $curr_row if !defined($row) or $row == -1;
498 }
499 return _FillConsoleOutputAttribute($self->{'handle'}, $attr, $number, $col, $row);
500}
501
502#=============
503sub FillChar {
504#=============
505 my($self, $char, $number, $col, $row) = @_;
506 return undef unless ref($self);
507
508 if (!defined($col) or !defined($row) or $col == -1 or $row == -1) {
509 ($discard, $discard,
510 $curr_col, $curr_row) = _GetConsoleScreenBufferInfo($self->{'handle'});
511 $col = $curr_col if !defined($col) or $col == -1;
512 $row = $curr_row if !defined($row) or $row == -1;
513 }
514 return _FillConsoleOutputCharacter($self->{'handle'}, $char, $number, $col, $row);
515}
516
517#============
518
# spent 0s within Win32::Console::InputCP which was called: # once (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 44 of ExtUtils/MakeMaker/Locale.pm
sub InputCP {
519#============
52010s my($self, $codepage) = @_;
52110s $codepage = $self if (defined($self) and ref($self) ne "Win32::Console");
52210s if (defined($codepage)) {
523 return _SetConsoleCP($codepage);
524 }
525 else {
52610s10s return _GetConsoleCP();
# spent 0s making 1 call to Win32::Console::_GetConsoleCP
527 }
528}
529
530#=============
531
# spent 0s within Win32::Console::OutputCP which was called: # once (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 46 of ExtUtils/MakeMaker/Locale.pm
sub OutputCP {
532#=============
53310s my($self, $codepage) = @_;
53410s $codepage = $self if (defined($self) and ref($self) ne "Win32::Console");
53510s if (defined($codepage)) {
536 return _SetConsoleOutputCP($codepage);
537 }
538 else {
53910s10s return _GetConsoleOutputCP();
# spent 0s making 1 call to Win32::Console::_GetConsoleOutputCP
540 }
541}
542
543#======================
544sub GenerateCtrlEvent {
545#======================
546 my($self, $type, $pid) = @_;
547 $type = constant("CTRL_C_EVENT", 0) unless defined($type);
548 $pid = 0 unless defined($pid);
549 return _GenerateConsoleCtrlEvent($type, $pid);
550}
551
552#===================
553#sub SetCtrlHandler {
554#===================
555# my($name, $add) = @_;
556# $add = 1 unless defined($add);
557# my @nor = keys(%HandlerRoutineStack);
558# if ($add == 0) {
559# foreach $key (@nor) {
560# delete $HandlerRoutineStack{$key}, last if $HandlerRoutineStack{$key}==$name;
561# }
562# $HandlerRoutineRegistered--;
563# } else {
564# if ($#nor == -1) {
565# my $r = _SetConsoleCtrlHandler();
566# if (!$r) {
567# print "WARNING: SetConsoleCtrlHandler failed...\n";
568# }
569# }
570# $HandlerRoutineRegistered++;
571# $HandlerRoutineStack{$HandlerRoutineRegistered} = $name;
572# }
573#}
574
575#===================
576sub get_Win32_IPC_HANDLE { # So Win32::IPC can wait on a console handle
577#===================
578 $_[0]->{'handle'};
579}
580
581########################################################################
582# PRIVATE METHODS
583#
584
585#================
586#sub CtrlHandler {
587#================
588# my($ctrltype) = @_;
589# my $routine;
590# my $result = 0;
591# CALLEM: foreach $routine (sort { $b <=> $a } keys %HandlerRoutineStack) {
592# #print "CtrlHandler: calling $HandlerRoutineStack{$routine}($ctrltype)\n";
593# $result = &{"main::".$HandlerRoutineStack{$routine}}($ctrltype);
594# last CALLEM if $result;
595# }
596# return $result;
597#}
598
599#============
600sub DESTROY {
601#============
602 my($self) = @_;
603 _CloseHandle($self->{'handle'});
604}
605
606#######################################################################
607# dynamically load in the Console.pll module.
608#
609
61010s10sbootstrap Win32::Console;
# spent 0s making 1 call to DynaLoader::bootstrap
611
612#######################################################################
613# ADDITIONAL CONSTANTS EXPORTED IN THE MAIN NAMESPACE
614#
615
61610s$FG_BLACK = 0;
61710s10s$FG_GRAY = constant("FOREGROUND_INTENSITY",0);
# spent 0s making 1 call to Win32::Console::constant
61810s10s$FG_BLUE = constant("FOREGROUND_BLUE",0);
# spent 0s making 1 call to Win32::Console::constant
61910s20s$FG_LIGHTBLUE = constant("FOREGROUND_BLUE",0)|
# spent 0s making 2 calls to Win32::Console::constant, avg 0s/call
620 constant("FOREGROUND_INTENSITY",0);
62110s10s$FG_RED = constant("FOREGROUND_RED",0);
# spent 0s making 1 call to Win32::Console::constant
62210s20s$FG_LIGHTRED = constant("FOREGROUND_RED",0)|
# spent 0s making 2 calls to Win32::Console::constant, avg 0s/call
623 constant("FOREGROUND_INTENSITY",0);
62410s10s$FG_GREEN = constant("FOREGROUND_GREEN",0);
# spent 0s making 1 call to Win32::Console::constant
62510s20s$FG_LIGHTGREEN = constant("FOREGROUND_GREEN",0)|
# spent 0s making 2 calls to Win32::Console::constant, avg 0s/call
626 constant("FOREGROUND_INTENSITY",0);
62710s20s$FG_MAGENTA = constant("FOREGROUND_RED",0)|
# spent 0s making 2 calls to Win32::Console::constant, avg 0s/call
628 constant("FOREGROUND_BLUE",0);
62910s30s$FG_LIGHTMAGENTA = constant("FOREGROUND_RED",0)|
# spent 0s making 3 calls to Win32::Console::constant, avg 0s/call
630 constant("FOREGROUND_BLUE",0)|
631 constant("FOREGROUND_INTENSITY",0);
63210s20s$FG_CYAN = constant("FOREGROUND_GREEN",0)|
# spent 0s making 2 calls to Win32::Console::constant, avg 0s/call
633 constant("FOREGROUND_BLUE",0);
63410s30s$FG_LIGHTCYAN = constant("FOREGROUND_GREEN",0)|
# spent 0s making 3 calls to Win32::Console::constant, avg 0s/call
635 constant("FOREGROUND_BLUE",0)|
636 constant("FOREGROUND_INTENSITY",0);
63710s20s$FG_BROWN = constant("FOREGROUND_RED",0)|
# spent 0s making 2 calls to Win32::Console::constant, avg 0s/call
638 constant("FOREGROUND_GREEN",0);
63910s30s$FG_YELLOW = constant("FOREGROUND_RED",0)|
# spent 0s making 3 calls to Win32::Console::constant, avg 0s/call
640 constant("FOREGROUND_GREEN",0)|
641 constant("FOREGROUND_INTENSITY",0);
64210s30s$FG_LIGHTGRAY = constant("FOREGROUND_RED",0)|
# spent 0s making 3 calls to Win32::Console::constant, avg 0s/call
643 constant("FOREGROUND_GREEN",0)|
644 constant("FOREGROUND_BLUE",0);
64510s40s$FG_WHITE = constant("FOREGROUND_RED",0)|
# spent 0s making 4 calls to Win32::Console::constant, avg 0s/call
646 constant("FOREGROUND_GREEN",0)|
647 constant("FOREGROUND_BLUE",0)|
648 constant("FOREGROUND_INTENSITY",0);
649
65010s$BG_BLACK = 0;
65110s10s$BG_GRAY = constant("BACKGROUND_INTENSITY",0);
# spent 0s making 1 call to Win32::Console::constant
65210s10s$BG_BLUE = constant("BACKGROUND_BLUE",0);
# spent 0s making 1 call to Win32::Console::constant
65310s20s$BG_LIGHTBLUE = constant("BACKGROUND_BLUE",0)|
# spent 0s making 2 calls to Win32::Console::constant, avg 0s/call
654 constant("BACKGROUND_INTENSITY",0);
65510s10s$BG_RED = constant("BACKGROUND_RED",0);
# spent 0s making 1 call to Win32::Console::constant
65610s20s$BG_LIGHTRED = constant("BACKGROUND_RED",0)|
# spent 0s making 2 calls to Win32::Console::constant, avg 0s/call
657 constant("BACKGROUND_INTENSITY",0);
65810s10s$BG_GREEN = constant("BACKGROUND_GREEN",0);
# spent 0s making 1 call to Win32::Console::constant
65910s20s$BG_LIGHTGREEN = constant("BACKGROUND_GREEN",0)|
# spent 0s making 2 calls to Win32::Console::constant, avg 0s/call
660 constant("BACKGROUND_INTENSITY",0);
66110s20s$BG_MAGENTA = constant("BACKGROUND_RED",0)|
# spent 0s making 2 calls to Win32::Console::constant, avg 0s/call
662 constant("BACKGROUND_BLUE",0);
66310s30s$BG_LIGHTMAGENTA = constant("BACKGROUND_RED",0)|
# spent 0s making 3 calls to Win32::Console::constant, avg 0s/call
664 constant("BACKGROUND_BLUE",0)|
665 constant("BACKGROUND_INTENSITY",0);
66610s20s$BG_CYAN = constant("BACKGROUND_GREEN",0)|
# spent 0s making 2 calls to Win32::Console::constant, avg 0s/call
667 constant("BACKGROUND_BLUE",0);
66810s30s$BG_LIGHTCYAN = constant("BACKGROUND_GREEN",0)|
# spent 0s making 3 calls to Win32::Console::constant, avg 0s/call
669 constant("BACKGROUND_BLUE",0)|
670 constant("BACKGROUND_INTENSITY",0);
67110s20s$BG_BROWN = constant("BACKGROUND_RED",0)|
# spent 0s making 2 calls to Win32::Console::constant, avg 0s/call
672 constant("BACKGROUND_GREEN",0);
67310s30s$BG_YELLOW = constant("BACKGROUND_RED",0)|
# spent 0s making 3 calls to Win32::Console::constant, avg 0s/call
674 constant("BACKGROUND_GREEN",0)|
675 constant("BACKGROUND_INTENSITY",0);
67610s30s$BG_LIGHTGRAY = constant("BACKGROUND_RED",0)|
# spent 0s making 3 calls to Win32::Console::constant, avg 0s/call
677 constant("BACKGROUND_GREEN",0)|
678 constant("BACKGROUND_BLUE",0);
67910s40s$BG_WHITE = constant("BACKGROUND_RED",0)|
# spent 0s making 4 calls to Win32::Console::constant, avg 0s/call
680 constant("BACKGROUND_GREEN",0)|
681 constant("BACKGROUND_BLUE",0)|
682 constant("BACKGROUND_INTENSITY",0);
683
68410s$ATTR_NORMAL = $FG_LIGHTGRAY|$BG_BLACK;
68510s$ATTR_INVERSE = $FG_BLACK|$BG_LIGHTGRAY;
686
68710sfor my $fg ($FG_BLACK, $FG_GRAY, $FG_BLUE, $FG_GREEN,
688 $FG_CYAN, $FG_RED, $FG_MAGENTA, $FG_BROWN,
689 $FG_LIGHTBLUE, $FG_LIGHTGREEN, $FG_LIGHTCYAN,
690 $FG_LIGHTRED, $FG_LIGHTMAGENTA, $FG_YELLOW,
691 $FG_LIGHTGRAY, $FG_WHITE)
692{
693160s for my $bg ($BG_BLACK, $BG_GRAY, $BG_BLUE, $BG_GREEN,
694 $BG_CYAN, $BG_RED, $BG_MAGENTA, $BG_BROWN,
695 $BG_LIGHTBLUE, $BG_LIGHTGREEN, $BG_LIGHTCYAN,
696 $BG_LIGHTRED, $BG_LIGHTMAGENTA, $BG_YELLOW,
697 $BG_LIGHTGRAY, $BG_WHITE)
698 {
6992560s push(@CONSOLE_COLORS, $fg|$bg);
700 }
701}
702
703# Preloaded methods go here.
704
705#Currently Autoloading is not implemented in Perl for win32
706# Autoload methods go after __END__, and are processed by the autosplit program.
707
70810s1;
709
710__END__
 
# spent 0s within Win32::Console::_GetConsoleCP which was called: # once (0s+0s) by Win32::Console::InputCP at line 526
sub Win32::Console::_GetConsoleCP; # xsub
# spent 0s within Win32::Console::_GetConsoleOutputCP which was called: # once (0s+0s) by Win32::Console::OutputCP at line 539
sub Win32::Console::_GetConsoleOutputCP; # xsub
# spent 0s within Win32::Console::bootstrap which was called: # once (0s+0s) by DynaLoader::bootstrap at line 216 of DynaLoader.pm
sub Win32::Console::bootstrap; # xsub
# spent 0s within Win32::Console::constant which was called 64 times, avg 0s/call: # 4 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 645, avg 0s/call # 4 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 679, avg 0s/call # 3 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 634, avg 0s/call # 3 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 639, avg 0s/call # 3 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 676, avg 0s/call # 3 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 642, avg 0s/call # 3 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 663, avg 0s/call # 3 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 629, avg 0s/call # 3 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 673, avg 0s/call # 3 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 668, avg 0s/call # 2 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 656, avg 0s/call # 2 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 619, avg 0s/call # 2 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 622, avg 0s/call # 2 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 625, avg 0s/call # 2 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 637, avg 0s/call # 2 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 671, avg 0s/call # 2 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 653, avg 0s/call # 2 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 632, avg 0s/call # 2 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 627, avg 0s/call # 2 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 666, avg 0s/call # 2 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 661, avg 0s/call # 2 times (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 659, avg 0s/call # once (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 624 # once (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 651 # once (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 617 # once (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 652 # once (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 618 # once (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 621 # once (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 655 # once (0s+0s) by ExtUtils::MakeMaker::Locale::_init at line 658
sub Win32::Console::constant; # xsub