Skip to content

Instantly share code, notes, and snippets.

@amiri
Forked from ryannscy/gist:1997306
Created March 8, 2012 01:47
Show Gist options
  • Save amiri/1997939 to your computer and use it in GitHub Desktop.
Save amiri/1997939 to your computer and use it in GitHub Desktop.
A tasks data structure
my $tasks = [
# Task 1
{ id => 1,
title => "Do stuff",
date_created => "2012-03-06 22:42:40",
date_modified => undef,
date_ended => undef,
priority_level => "2",
status_level => "active",
# Two goals for task 1
goals => [
{ id => 20,
todo => "Do sumpm",
date_created => "2011-03-06 22:42:40",
date_modified => "2012-03-06 22:40:40",
date_ended => undef,
priority_level => 1,
status_level => 'active',
},
{ id => 17,
todo => "Do sumpm else",
date_created => "2011-01-13 22:42:40",
date_modified => "2012-03-06 09:40:40",
date_ended => undef,
priority_level => 2,
status_level => 'active',
},
]
},
# Task 2
{ id => 2,
title => "Buy stuff",
date_created => "2010-01-19 12:42:40",
date_modified => undef,
date_ended => undef,
priority_level => "9",
status_level => "active",
# 1 goal for task 2
goals => [
{ id => 21,
todo => "Visit store",
date_created => "2012-03-01 06:42:40",
date_modified => "2012-03-05 22:40:40",
date_ended => undef,
priority_level => 1,
status_level => 'active',
},
]
},
# Task 3
{ id => 3,
title => "Read Ana Karenina",
date_created => "2010-01-15 12:42:40",
date_modified => undef,
date_ended => undef,
priority_level => "3",
status_level => "active",
# No goals for task 3
goals => []
},
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment