Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Spellcheck!

  • Loading branch information...
commit 1cab8337bb8bc5ca8dc222beca93e2e6681edaa7 1 parent 4d2c67c
Mark Fowler authored
32 lib/Test/DatabaseRow.pm
@@ -52,9 +52,9 @@ sub row_ok {
52 52 my $tbr = $class->new(%args);
53 53 my $tbr_result = $tbr->test_ok();
54 54
55   - # store the results of the databae operation if needed
  55 + # store the results of the database operation if needed
56 56 # this is another example of functionality that is difficult
57   - # to add to a procedual interface and would have been easier
  57 + # to add to a procedural interface and would have been easier
58 58 # if I'd used an OO interface. That's the problem with
59 59 # published APIs though, isn't it? It's hard to change them
60 60 if ($args{store_rows}) {
@@ -180,14 +180,14 @@ bind variables that will be used to fill in placeholders.
180 180
181 181 =item table
182 182
183   -Build the SELECT statement programatically. This parameter contains the name
  183 +Build the SELECT statement programmatically. This parameter contains the name
184 184 of the table the SELECT statement should be executed against. You cannot
185 185 pass both a C<table> parameter and a C<sql> parameter. If you specify
186 186 C<table> you B<must> pass a C<where> parameter also (see below.)
187 187
188 188 =item where
189 189
190   -Build the SELECT statement programatically. This parameter should contain
  190 +Build the SELECT statement programmatically. This parameter should contain
191 191 options that will combine into a WHERE clause in order to select the row
192 192 that you want to test.
193 193
@@ -218,7 +218,7 @@ associated operator SQL should search for.
218 218
219 219 This syntax is quite flexible, but can be overkill for simple tests.
220 220 In order to make this simpler, if you are only using '=' tests you
221   -may just pass an arrayref of the columnnames / values. For example,
  221 +may just pass an arrayref of the column names / values. For example,
222 222 just to test
223 223
224 224 SELECT *
@@ -310,7 +310,7 @@ C<TEST_DBROW_VERBOSE> environmental variable to a true value.
310 310
311 311 Sometimes, it's not enough to just use the simple tests that
312 312 B<Test::DatabaseRow> offers you. In this situation you can use the
313   -C<store_rows> function to get at the results that row_ok has extacted
  313 +C<store_rows> function to get at the results that row_ok has extracted
314 314 from the database. You should pass a reference to an array for the
315 315 results to be stored in; After the call to C<row_ok> this array
316 316 will be populated with one hashref per row returned from the database,
@@ -464,9 +464,9 @@ complex select statements that can easily be 'tied in' to C<row_ok>:
464 464
465 465 Often, you may store data utf8 data in your database. However, many
466 466 modern databases still do not store the metadata to indicate the data
467   -stored in them is utf8 and thier DBD drivers may not set the utf8 flag
  467 +stored in them is utf8 and their DBD drivers may not set the utf8 flag
468 468 on values returned to Perl. This means that data returned to Perl
469   -will be treated as if it is encoded in your normal charecter set
  469 +will be treated as if it is encoded in your normal character set
470 470 rather than being encoded in utf8 and when compared to a byte for
471 471 byte an identical utf8 string may fail comparison.
472 472
@@ -494,13 +494,13 @@ Or set the global C<$Test::DatabaseRow::force_utf8> variable
494 494 tests => [ name => "Napol\x{e9}on" ]);
495 495
496 496 Please note that in the above examples with C<use utf8> enabled I
497   -could have typed unicode eacutes into the string directly rather than
  497 +could have typed Unicode eacutes into the string directly rather than
498 498 using the C<\x{e9}> escape sequence, but alas the pod renderer you're
499 499 using to view this documentation would have been unlikely to render
500 500 those examples correctly, so I didn't.
501 501
502 502 Please also note that if you want the debug information that this
503   -module creates to be redered to STDERR correctly for your utf8
  503 +module creates to be rendered to STDERR correctly for your utf8
504 504 terminal then you may need to stick
505 505
506 506 binmode STDERR, ":utf8";
@@ -514,7 +514,7 @@ C<Test::DatabaseRow::Object> to do the actual work. If you want
514 514 to subclass that class (for example to use an alternative method
515 515 of accessing the database) but continue to use this wrapper
516 516 class you can do so by setting the C<$Test::DatabaseRow::object_class>
517   -varaible.
  517 +variable.
518 518
519 519 For example:
520 520
@@ -547,11 +547,11 @@ turned on for some fields and not on for others.
547 547 The inbuilt SQL builder always assumes you mean C<IS NULL> not
548 548 C<= NULL> when you pass in C<undef> in a C<=> section
549 549
550   -Bugs (and requests for new features) can be reported to the open source
551   -development team at Profero though the CPAN RT system:
  550 +Bugs (and requests for new features) can be reported though the CPAN
  551 +RT system:
552 552 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-DatabaseRow>
553 553
554   -Alternativly, you can simply fork this project on github and
  554 +Alternatively, you can simply fork this project on github and
555 555 send me pull requests. Please see <http://github.com/2shortplanks/Test-DataabseRow>
556 556
557 557 =head1 AUTHOR
@@ -560,10 +560,6 @@ Written by Mark Fowler B<mark@twoshortplanks.com>
560 560
561 561 Copyright Profero 2003, 2004. Copyright Mark Fowler 2011.
562 562
563   -Some code taken from B<Test::Builder>, written by Michael Schwern.
564   -Some code taken from B<Regexp::Common>, written by Damian Conway. Neither
565   -objected to it's inclusion in this module.
566   -
567 563 This program is free software; you can redistribute it and/or modify
568 564 it under the same terms as Perl itself.
569 565
26 lib/Test/DatabaseRow/Object.pm
@@ -36,7 +36,7 @@ unless (eval { require Regexp::Common; Regexp::Common->import; 1 }) {
36 36 # constructor and accessors
37 37 #
38 38 # note that this is all written in the Moose style, even though we
39   -# don't actualy use Moose (because it's too big a dependancy
  39 +# don't actually use Moose (because it's too big a dependency
40 40 # for this widely used Test module.) Hopefully if you use Moose
41 41 # a lot (and you should) then the conventions used in this code will
42 42 # be understandable.
@@ -52,7 +52,7 @@ unless (eval { require Regexp::Common; Regexp::Common->import; 1 }) {
52 52 # Some of this code could have been made shorter via meta programing
53 53 # e.g. programming to dynamically create methods, making the has_XXX
54 54 # attributes automatic. I've deliberately not done that since that
55   -# would drastically reduce the readablilty of this code. I'm not against
  55 +# would drastically reduce the readability of this code. I'm not against
56 56 # that kind of thing, but it should be packaged up in it's own module,
57 57 # and that would end up re-inventing Moose...
58 58 #
@@ -551,8 +551,8 @@ C<has_> to determine if it has been set or not.
551 551
552 552 An arrayref of hashrefs, each representing a row returned from
553 553 the database. Each key in the hashref should be the column name
554   -and the value the corrisponding field's value. This
555   -databastructure is idential to that.
  554 +and the value the corresponding field's value. This
  555 +datastructure is identical to that.
556 556
557 557 If this accessor is not passed then it will be populated on
558 558 first use by executing the contents of C<sql_and_bind> against the
@@ -564,7 +564,7 @@ The SQL and bind variables to execute if no results were passed
564 564 into the db_results hash. This should be an arrayref containing
565 565 the SQL as the first element and the bind values as further values.
566 566
567   -This accessor will auotmatically coerce a simple scalar passed
  567 +This accessor will automatically coerce a simple scalar passed
568 568 in into a single
569 569
570 570 If this accessor is not passed then it will be populated on
@@ -572,7 +572,7 @@ first use by building SQL from the C<where> and C<table> accessors.
572 572
573 573 =item dbh
574 574
575   -The databse handle used to execute the SQL statement in
  575 +The database handle used to execute the SQL statement in
576 576 C<sql_and_bind> if no C<db_results> were passed.
577 577
578 578 =item table
@@ -598,7 +598,7 @@ to match against. For example:
598 598 Values of C<undef> will automatically converted into checks
599 599 for NULLs.
600 600
601   -This accessor automatically coereces array refs that are
  601 +This accessor automatically coerces array refs that are
602 602 passed into a pure equals hashref. For example:
603 603
604 604 [ foo => "bar", bazz => "buzz" ]
@@ -640,7 +640,7 @@ test against. For example:
640 640 '=~' => { address => "%Bedrock%" },
641 641 }
642 642
643   -This accessor automatically coereces array refs that are
  643 +This accessor automatically coerces array refs that are
644 644 passed into a hashref structure, converting things that look
645 645 like strings into C<eq> tests, things that look like numbers
646 646 into C<==> tests and things that are references to regular
@@ -702,7 +702,7 @@ for the number of results.
702 702 =item row_at_index_ok( $row_index )
703 703
704 704 Returns a Test::DatabaseRow::Result that represents if the
705   -element corrisponding to the passed row index in C<db_results>
  705 +element corresponding to the passed row index in C<db_results>
706 706 match the tests defined in C<tests>.
707 707
708 708 =item db_results_ok
@@ -721,11 +721,11 @@ elements in C<db_results> match the tests defined in C<tests>.
721 721
722 722 =head1 BUGS
723 723
724   -Bugs (and requests for new features) can be reported to the open source
725   -development team at Profero though the CPAN RT system:
  724 +Bugs (and requests for new features) can be reported though
  725 +the CPAN RT system:
726 726 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-DatabaseRow>
727 727
728   -Alternativly, you can simply fork this project on github and
  728 +Alternatively, you can simply fork this project on github and
729 729 send me pull requests. Please see <http://github.com/2shortplanks/Test-DataabseRow>
730 730
731 731 =head1 AUTHOR
@@ -736,7 +736,7 @@ Copyright Profero 2003, 2004. Copyright Mark Fowler 2011.
736 736
737 737 Some code taken from B<Test::Builder>, written by Michael Schwern.
738 738 Some code taken from B<Regexp::Common>, written by Damian Conway. Neither
739   -objected to it's inclusion in this module.
  739 +objected to its inclusion in this module.
740 740
741 741 Some code taken from B<Lingua::EN::Numbers::Ordinate>, written by Sean M. Burke.
742 742
10 lib/Test/DatabaseRow/Result.pm
@@ -23,7 +23,7 @@ sub new {
23 23 return $self;
24 24 }
25 25
26   -## acessors ############################################################
  26 +## accessors ############################################################
27 27
28 28 # has is_error => ( is => "ro", isa => "Bool", default => 0,
29 29 # predicate => 'has_error' )
@@ -135,7 +135,7 @@ the values of the accessors.
135 135
136 136 =item add_diag( @diagnostics )
137 137
138   -Adds extra diagnositics to the C<diag> array.
  138 +Adds extra diagnostics to the C<diag> array.
139 139
140 140 =item pass_to_test_builder( $label )
141 141
@@ -149,11 +149,11 @@ Returns true if and only if C<is_error> is false.
149 149
150 150 =head1 BUGS
151 151
152   -Bugs (and requests for new features) can be reported to the open source
153   -development team at Profero though the CPAN RT system:
  152 +Bugs (and requests for new features) can be reported though the
  153 +CPAN RT system:
154 154 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-DatabaseRow>
155 155
156   -Alternativly, you can simply fork this project on github and
  156 +Alternatively, you can simply fork this project on github and
157 157 send me pull requests. Please see <http://github.com/2shortplanks/Test-DataabseRow>
158 158
159 159 =head1 AUTHOR

0 comments on commit 1cab833

Please sign in to comment.
Something went wrong with that request. Please try again.