In any case, for 2D rotations, quaternions are overkill. You can just use complex numbers.
In reply to Re^3: Perl and Quaternions by salva in thread Perl and Quaternions by Fair Strides