Skip to content

Commit

Permalink
describe chained MPI operations in pod
Browse files Browse the repository at this point in the history
git-svn-id: svn://localhost/Crypt-GCrypt/trunk@86 c2f821fb-fd85-dc11-8383-000bcdcb7a8f
  • Loading branch information
dkg committed Jan 23, 2010
1 parent b17d60a commit afebd65
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/Crypt/GCrypt/MPI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ identical to "$a = Crypt::GCrypt::MPI->new($b);"
=head1 CALCULATIONS
All calculation operations modify the object they are called on, and
return the same object, so you can chain them like this:
$g->addm($a, $m)->mulm($b, $m)->gcd($x);
If you don't want an operation to affect the initial object, use the
copy() operator:
$h = $g->copy()->addm($a, $m)->mulm($b, $m)->gcd($x);
=head2 add($other)
Adds the value of $other to this MPI.
Expand Down

0 comments on commit afebd65

Please sign in to comment.