Skip to content

Commit

Permalink
add changes, improve docu, bump version number
Browse files Browse the repository at this point in the history
  • Loading branch information
2shortplanks committed Nov 29, 2012
1 parent e2e3c8b commit 8f27868
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 17 deletions.
4 changes: 4 additions & 0 deletions CHANGES
@@ -0,0 +1,4 @@
1.01 Better (and more accurate) documentation.
Tests to ensure non-existent variables return the empty string

1.00 Initial release
1 change: 1 addition & 0 deletions MANIFEST
@@ -1,3 +1,4 @@
CHANGES
inc/Module/Install.pm
inc/Module/Install/AuthorTests.pm
inc/Module/Install/Base.pm
Expand Down
7 changes: 6 additions & 1 deletion META.yml
Expand Up @@ -24,5 +24,10 @@ requires:
Test::More: 0
perl: 5.6.0
resources:
homepage: https://github.com/2shortplanks/Mac-KeyboardMaestro/tree
license: http://dev.perl.org/licenses/
version: 1.00
repository:
type: git
url: git://github.com/2shortplanks/Mac-KeyboardMaestro.git
web: https://github.com/2shortplanks/Mac-KeyboardMaestro/tree
version: 1.01
17 changes: 10 additions & 7 deletions README
Expand Up @@ -26,22 +26,25 @@ DESCRIPTION

Functions
These functions can be imported, or you can use them fully qualified.
All functions throw exceptions if the AppleScript interface to Keyboard
Maestro returns an error.

km_macro $macro_name
km_macro $macro_uuid
Execute the named macro / macro with the passed uuid. Returns
nothing. Throws and exception if there's a problem.
Execute the named macro / macro with the passed uuid. Returns an
empty list.

km_set $varname, $value
Sets the value of the corrisponding Keyboard Macro variable. $value
will be automatically stringified.
will be automatically stringified. Returns an empty list.

km_get $varname
Gets the current value of the corrisponding Keyboard Macro variable.
Returns "undef" if no such variable exists.
Returns the empty string if the variable does not exist.

km_delete $varname
Deletes the corrisponding Keyboard Macro variable
Deletes the corrisponding Keyboard Macro variable. Returns an empty
list.

AUTHOR
Written by Mark Fowler <mark@twoshortplanks.com>
Expand All @@ -53,8 +56,8 @@ COPYRIGHT
under the same terms as Perl itself.

Keyboard Maestro itself is copyright Stairways Software Pty Ltd. Neither
Mark Fowler nor this Perl library is not associated with Keyboard
Maestro or Stairways Software Pty Ltd.
Mark Fowler nor this Perl library is associated with Keyboard Maestro or
Stairways Software Pty Ltd.

BUGS
Bugs should be reported via this distribution's CPAN RT queue. This can
Expand Down
17 changes: 9 additions & 8 deletions lib/Mac/KeyboardMaestro.pm
Expand Up @@ -13,7 +13,7 @@ our @EXPORT_OK;
use Mac::AppleScript qw(RunAppleScript);
use Carp qw(croak);

our $VERSION = "1.00";
our $VERSION = "1.01";

=head1 NAME
Expand Down Expand Up @@ -46,16 +46,17 @@ values as AppleScript by mistake.
=head2 Functions
These functions can be imported, or you can use them fully qualified.
These functions can be imported, or you can use them fully qualified. All
functions throw exceptions if the AppleScript interface to Keyboard Maestro
returns an error.
=over
=item km_macro $macro_name
=item km_macro $macro_uuid
Execute the named macro / macro with the passed uuid. Returns nothing. Throws
and exception if there's a problem.
Execute the named macro / macro with the passed uuid. Returns an empty list.
=cut

Expand Down Expand Up @@ -97,7 +98,7 @@ push @EXPORT_OK, 'km_macro';
=item km_set $varname, $value
Sets the value of the corrisponding Keyboard Macro variable. C<$value> will
be automatically stringified.
be automatically stringified. Returns an empty list.
=cut

Expand All @@ -113,7 +114,7 @@ push @EXPORT_OK, 'km_set';
=item km_get $varname
Gets the current value of the corrisponding Keyboard Macro variable. Returns
C<undef> if no such variable exists.
the empty string if the variable does not exist.
=cut

Expand All @@ -127,7 +128,7 @@ push @EXPORT_OK, 'km_get';

=item km_delete $varname
Deletes the corrisponding Keyboard Macro variable
Deletes the corrisponding Keyboard Macro variable. Returns an empty list.
=cut

Expand All @@ -153,7 +154,7 @@ This program is free software; you can redistribute it
and/or modify it under the same terms as Perl itself.
Keyboard Maestro itself is copyright Stairways Software Pty Ltd. Neither Mark
Fowler nor this Perl library is not associated with Keyboard Maestro or
Fowler nor this Perl library is associated with Keyboard Maestro or
Stairways Software Pty Ltd.
=head1 BUGS
Expand Down
6 changes: 5 additions & 1 deletion t/02vars.t
Expand Up @@ -3,7 +3,7 @@
use strict;
use warnings;

use Test::More tests => 2;
use Test::More tests => 3;
use Mac::KeyboardMaestro qw(km_set km_get km_delete);

my $varname = "mackeyboardmaestrotestsuite";
Expand All @@ -13,3 +13,7 @@ km_set $varname => $unique;
is km_get $varname, $unique, "variable was set";
km_delete $varname;
is km_get $varname, "", "variable is gone!";


# check that a totally random variable returns the empty string
is km_get "var".time.$$, "", "random var does not exist";

0 comments on commit 8f27868

Please sign in to comment.