The Perl wrapper is developed as an alternative for the original cal UNIX command line tool to provide improved functionality and flexibility. It simplifies the process of printing calendars and displaying calendar information on the command line.
The software includes three switches that can change the command's behavior: -m, -j, and -y. The -m switch sets Monday as the first day of the week. The -j switch generates the days in Julian format, while the -y option automatically creates a calendar for the year.
UNIX::Cal features one method - cal(). This method is pushed into the package's namespace, so it doesn't require a fully qualified name. The cal() method is called in three different ways. Calling without any arguments gives the calendar for the current month unless -y is specified. Calling cal(5,2002) returns the calendar for May 2002, while cal(2002) returns the calendar for all months in 2002.
The results from the cal() method are array references. When calling the method for a single month, the results look like this:
```
$VAR1 = [
[ 'May', 2002 ],
[ 'Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa' ],
[ '', '', '', 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, '' ]
];
```
On the other hand, when calling the method for a year, the results look like this:
```
$VAR1 = [
[ 2002 ],
[ [ 'January', 2002 ],
[ 'Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa' ],
[ '', '', 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, '', '' ]
],
[ [ 'February', 2002 ],
[ 'Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa' ],
[ '', '', '', '', '', 1, 2 ],
[ 3, 4, 5, 6, 7, 8, 9 ],
[ 10, 11, 12, 13, 14, 15, 16 ],
[ 17
Version 0.01: N/A