-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgantt_test.pl
61 lines (52 loc) · 1.73 KB
/
gantt_test.pl
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
#!/usr/bin/perl -w
# a fun, imaginary wednesday
use strict;
use Project::Gantt;
use Project::Gantt::Skin;
my $skin= new Project::Gantt::Skin(
doTitle => 0);
my $day = new Project::Gantt(
file => 'hourly.png',
skin => $skin,
mode => 'hours',
description => 'A day in the life');
my $al = $day->addResource(
name => 'Alex');
$day->addTask(
description => 'Finish sleep',
resource => $al,
start => '2004-07-21 00:00:00',
end => '2004-07-21 08:30:00');
$day->addTask(
description => 'Breakfast/Wakeup',
resource => $al,
start => '2004-07-21 08:30:00',
end => '2004-07-21 10:00:00');
my $sub = $day->addSubProject(
description => 'Important Stuff');
$sub->addTask(
description => 'Contemplate my navel',
resource => $al,
start => '2004-07-21 10:00:00',
end => '2004-07-21 11:00:00');
$day->addTask(
description => 'Lunch',
resource => $al,
start => '2004-07-21 11:00:00',
end => '2004-07-21 12:30:00');
$sub->addTask(
description => 'Wonder about life',
resource => $al,
start => '2004-07-21 11:00:00',
end => '2004-07-21 11:22:00');
$day->addTask(
description => 'Code for a while',
resource => $al,
start => '2004-07-21 12:30:00',
end => '2004-07-21 17:00:00');
$day->addTask(
description => 'Sail',
resource => $al,
start => '2004-07-21 17:00:00',
end => '2004-07-21 20:30:00');
$day->display();